From Jason Turner

[charconv.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5pirxdee/{from.md → to.md} +15 -21
tmp/tmp5pirxdee/{from.md → to.md} RENAMED
@@ -1,7 +1,15 @@
1
  ### Header `<charconv>` synopsis <a id="charconv.syn">[[charconv.syn]]</a>
2
 
 
 
 
 
 
 
 
 
3
  ``` cpp
4
  %
5
  %
6
  {chars_format{chars_format{chars_format{chars_formatnamespace std {
7
  // floating-point format for primitive numerical conversion
@@ -20,26 +28,16 @@
20
  char* ptr;
21
  errc ec;
22
  friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
23
  };
24
 
25
- to_chars_result to_chars(char* first, char* last, see below value, int base = 10);
26
  to_chars_result to_chars(char* first, char* last, bool value, int base = 10) = delete;
27
 
28
- to_chars_result to_chars(char* first, char* last, float value);
29
- to_chars_result to_chars(char* first, char* last, double value);
30
- to_chars_result to_chars(char* first, char* last, long double value);
31
-
32
- to_chars_result to_chars(char* first, char* last, float value, chars_format fmt);
33
- to_chars_result to_chars(char* first, char* last, double value, chars_format fmt);
34
- to_chars_result to_chars(char* first, char* last, long double value, chars_format fmt);
35
-
36
- to_chars_result to_chars(char* first, char* last, float value,
37
- chars_format fmt, int precision);
38
- to_chars_result to_chars(char* first, char* last, double value,
39
- chars_format fmt, int precision);
40
- to_chars_result to_chars(char* first, char* last, long double value,
41
  chars_format fmt, int precision);
42
  %
43
  %
44
  {from_chars_result{from_chars_result}
45
 
@@ -48,18 +46,14 @@
48
  const char* ptr;
49
  errc ec;
50
  friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
51
  };
52
 
53
- from_chars_result from_chars(const char* first, const char* last,
54
- see below& value, int base = 10);
55
 
56
- from_chars_result from_chars(const char* first, const char* last, float& value,
57
- chars_format fmt = chars_format::general);
58
- from_chars_result from_chars(const char* first, const char* last, double& value,
59
- chars_format fmt = chars_format::general);
60
- from_chars_result from_chars(const char* first, const char* last, long double& value,
61
  chars_format fmt = chars_format::general);
62
  }
63
  ```
64
 
65
  The type `chars_format` is a bitmask type [[bitmask.types]] with
 
1
  ### Header `<charconv>` synopsis <a id="charconv.syn">[[charconv.syn]]</a>
2
 
3
+ When a function is specified with a type placeholder of `integer-type`,
4
+ the implementation provides overloads for all cv-unqualified signed and
5
+ unsigned integer types and `char` in lieu of `integer-type`. When a
6
+ function is specified with a type placeholder of `floating-point-type`,
7
+ the implementation provides overloads for all cv-unqualified
8
+ floating-point types [[basic.fundamental]] in lieu of
9
+ `floating-point-type`.
10
+
11
  ``` cpp
12
  %
13
  %
14
  {chars_format{chars_format{chars_format{chars_formatnamespace std {
15
  // floating-point format for primitive numerical conversion
 
28
  char* ptr;
29
  errc ec;
30
  friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
31
  };
32
 
33
+ constexpr to_chars_result to_chars(char* first, char* last, integer-type value, int base = 10);
34
  to_chars_result to_chars(char* first, char* last, bool value, int base = 10) = delete;
35
 
36
+ to_chars_result to_chars(char* first, char* last, floating-point-type value);
37
+ to_chars_result to_chars(char* first, char* last, floating-point-type value, chars_format fmt);
38
+ to_chars_result to_chars(char* first, char* last, floating-point-type value,
 
 
 
 
 
 
 
 
 
 
39
  chars_format fmt, int precision);
40
  %
41
  %
42
  {from_chars_result{from_chars_result}
43
 
 
46
  const char* ptr;
47
  errc ec;
48
  friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
49
  };
50
 
51
+ constexpr from_chars_result from_chars(const char* first, const char* last,
52
+ integer-type& value, int base = 10);
53
 
54
+ from_chars_result from_chars(const char* first, const char* last, floating-point-type& value,
 
 
 
 
55
  chars_format fmt = chars_format::general);
56
  }
57
  ```
58
 
59
  The type `chars_format` is a bitmask type [[bitmask.types]] with