From Jason Turner

[charconv.from.chars]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppfmjan8m/{from.md → to.md} +3 -11
tmp/tmppfmjan8m/{from.md → to.md} RENAMED
@@ -19,12 +19,12 @@ unmodified and the member `ec` of the return value is equal to
19
  `errc::result_out_of_range`. Otherwise, `value` is set to the parsed
20
  value, after rounding according to `round_to_nearest` [[round.style]],
21
  and the member `ec` is value-initialized.
22
 
23
  ``` cpp
24
- from_chars_result from_chars(const char* first, const char* last,
25
- see below& value, int base = 10);
26
  ```
27
 
28
  *Preconditions:* `base` has a value between 2 and 36 (inclusive).
29
 
30
  *Effects:* The pattern is the expected form of the subject sequence in
@@ -33,20 +33,12 @@ except that no `"0x"` or `"0X"` prefix shall appear if the value of
33
  `base` is 16, and except that `’-’` is the only sign that may appear,
34
  and only if `value` has a signed type.
35
 
36
  *Throws:* Nothing.
37
 
38
- *Remarks:* The implementation shall provide overloads for all signed and
39
- unsigned integer types and `char` as the referenced type of the
40
- parameter `value`.
41
-
42
  ``` cpp
43
- from_chars_result from_chars(const char* first, const char* last, float& value,
44
- chars_format fmt = chars_format::general);
45
- from_chars_result from_chars(const char* first, const char* last, double& value,
46
- chars_format fmt = chars_format::general);
47
- from_chars_result from_chars(const char* first, const char* last, long double& value,
48
  chars_format fmt = chars_format::general);
49
  ```
50
 
51
  *Preconditions:* `fmt` has the value of one of the enumerators of
52
  `chars_format`.
 
19
  `errc::result_out_of_range`. Otherwise, `value` is set to the parsed
20
  value, after rounding according to `round_to_nearest` [[round.style]],
21
  and the member `ec` is value-initialized.
22
 
23
  ``` cpp
24
+ constexpr from_chars_result from_chars(const char* first, const char* last,
25
+ integer-type& value, int base = 10);
26
  ```
27
 
28
  *Preconditions:* `base` has a value between 2 and 36 (inclusive).
29
 
30
  *Effects:* The pattern is the expected form of the subject sequence in
 
33
  `base` is 16, and except that `’-’` is the only sign that may appear,
34
  and only if `value` has a signed type.
35
 
36
  *Throws:* Nothing.
37
 
 
 
 
 
38
  ``` cpp
39
+ from_chars_result from_chars(const char* first, const char* last, floating-point-type& value,
 
 
 
 
40
  chars_format fmt = chars_format::general);
41
  ```
42
 
43
  *Preconditions:* `fmt` has the value of one of the enumerators of
44
  `chars_format`.