From Jason Turner

[locale.ctype]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp1jfmi86i/{from.md → to.md} +14 -21
tmp/tmp1jfmi86i/{from.md → to.md} RENAMED
@@ -46,35 +46,32 @@ namespace std {
46
 
47
  Class `ctype` encapsulates the C library `<cctype>` features. `istream`
48
  members are required to use `ctype<>` for character classing during
49
  input parsing.
50
 
51
- The specializations required in Table 
52
- [[tab:localization.category.facets]] ([[locale.category]]), namely
53
- `ctype<char>` and `ctype<wchar_t>`, implement character classing
54
- appropriate to the implementation’s native character set.
55
 
56
  ##### `ctype` members <a id="locale.ctype.members">[[locale.ctype.members]]</a>
57
 
58
  ``` cpp
59
  bool is(mask m, charT c) const;
60
- const charT* is(const charT* low, const charT* high,
61
- mask* vec) const;
62
  ```
63
 
64
  *Returns:* `do_is(m, c)` or `do_is(low, high, vec)`.
65
 
66
  ``` cpp
67
- const charT* scan_is(mask m,
68
- const charT* low, const charT* high) const;
69
  ```
70
 
71
  *Returns:* `do_scan_is(m, low, high)`.
72
 
73
  ``` cpp
74
- const charT* scan_not(mask m,
75
- const charT* low, const charT* high) const;
76
  ```
77
 
78
  *Returns:* `do_scan_not(m, low, high)`.
79
 
80
  ``` cpp
@@ -98,22 +95,20 @@ const char* widen(const char* low, const char* high, charT* to) const;
98
 
99
  *Returns:* `do_widen(c)` or `do_widen(low, high, to)`.
100
 
101
  ``` cpp
102
  char narrow(charT c, char dfault) const;
103
- const charT* narrow(const charT* low, const charT* high, char dfault,
104
- char* to) const;
105
  ```
106
 
107
  *Returns:* `do_narrow(c, dfault)` or `do_narrow(low, high, dfault, to)`.
108
 
109
  ##### `ctype` virtual functions <a id="locale.ctype.virtuals">[[locale.ctype.virtuals]]</a>
110
 
111
  ``` cpp
112
  bool do_is(mask m, charT c) const;
113
- const charT* do_is(const charT* low, const charT* high,
114
- mask* vec) const;
115
  ```
116
 
117
  *Effects:* Classifies a character or sequence of characters. For each
118
  argument character, identifies a value `M` of type `ctype_base::mask`.
119
  The second form identifies a value `M` of type `ctype_base::mask` for
@@ -171,18 +166,17 @@ which a corresponding lower-case character exists, with that character.
171
  if it is known to exist, or its argument if not. The second form returns
172
  `high`.
173
 
174
  ``` cpp
175
  charT do_widen(char c) const;
176
- const char* do_widen(const char* low, const char* high,
177
- charT* dest) const;
178
  ```
179
 
180
  *Effects:* Applies the simplest reasonable transformation from a `char`
181
  value or sequence of `char` values to the corresponding `charT` value or
182
  values.[^5] The only characters for which unique transformations are
183
- required are those in the basic source character set ([[lex.charset]]).
184
 
185
  For any named `ctype` category with a `ctype <charT>` facet `ctc` and
186
  valid `ctype_base::mask` value `M`,
187
  `(ctc.is(M, c) || !is(M, do_widen(c)) )` is `true`.[^6]
188
 
@@ -192,20 +186,19 @@ The second form transforms each character `*p` in the range \[`low`,
192
  *Returns:* The first form returns the transformed value. The second form
193
  returns `high`.
194
 
195
  ``` cpp
196
  char do_narrow(charT c, char dfault) const;
197
- const charT* do_narrow(const charT* low, const charT* high,
198
- char dfault, char* dest) const;
199
  ```
200
 
201
  *Effects:* Applies the simplest reasonable transformation from a `charT`
202
  value or sequence of `charT` values to the corresponding `char` value or
203
  values.
204
 
205
- For any character `c` in the basic source character
206
- set ([[lex.charset]]) the transformation is such that
207
 
208
  ``` cpp
209
  do_widen(do_narrow(c, 0)) == c
210
  ```
211
 
 
46
 
47
  Class `ctype` encapsulates the C library `<cctype>` features. `istream`
48
  members are required to use `ctype<>` for character classing during
49
  input parsing.
50
 
51
+ The specializations required in [[locale.category.facets]]
52
+ [[locale.category]], namely `ctype<char>` and `ctype<wchar_t>`,
53
+ implement character classing appropriate to the implementation’s native
54
+ character set.
55
 
56
  ##### `ctype` members <a id="locale.ctype.members">[[locale.ctype.members]]</a>
57
 
58
  ``` cpp
59
  bool is(mask m, charT c) const;
60
+ const charT* is(const charT* low, const charT* high, mask* vec) const;
 
61
  ```
62
 
63
  *Returns:* `do_is(m, c)` or `do_is(low, high, vec)`.
64
 
65
  ``` cpp
66
+ const charT* scan_is(mask m, const charT* low, const charT* high) const;
 
67
  ```
68
 
69
  *Returns:* `do_scan_is(m, low, high)`.
70
 
71
  ``` cpp
72
+ const charT* scan_not(mask m, const charT* low, const charT* high) const;
 
73
  ```
74
 
75
  *Returns:* `do_scan_not(m, low, high)`.
76
 
77
  ``` cpp
 
95
 
96
  *Returns:* `do_widen(c)` or `do_widen(low, high, to)`.
97
 
98
  ``` cpp
99
  char narrow(charT c, char dfault) const;
100
+ const charT* narrow(const charT* low, const charT* high, char dfault, char* to) const;
 
101
  ```
102
 
103
  *Returns:* `do_narrow(c, dfault)` or `do_narrow(low, high, dfault, to)`.
104
 
105
  ##### `ctype` virtual functions <a id="locale.ctype.virtuals">[[locale.ctype.virtuals]]</a>
106
 
107
  ``` cpp
108
  bool do_is(mask m, charT c) const;
109
+ const charT* do_is(const charT* low, const charT* high, mask* vec) const;
 
110
  ```
111
 
112
  *Effects:* Classifies a character or sequence of characters. For each
113
  argument character, identifies a value `M` of type `ctype_base::mask`.
114
  The second form identifies a value `M` of type `ctype_base::mask` for
 
166
  if it is known to exist, or its argument if not. The second form returns
167
  `high`.
168
 
169
  ``` cpp
170
  charT do_widen(char c) const;
171
+ const char* do_widen(const char* low, const char* high, charT* dest) const;
 
172
  ```
173
 
174
  *Effects:* Applies the simplest reasonable transformation from a `char`
175
  value or sequence of `char` values to the corresponding `charT` value or
176
  values.[^5] The only characters for which unique transformations are
177
+ required are those in the basic source character set [[lex.charset]].
178
 
179
  For any named `ctype` category with a `ctype <charT>` facet `ctc` and
180
  valid `ctype_base::mask` value `M`,
181
  `(ctc.is(M, c) || !is(M, do_widen(c)) )` is `true`.[^6]
182
 
 
186
  *Returns:* The first form returns the transformed value. The second form
187
  returns `high`.
188
 
189
  ``` cpp
190
  char do_narrow(charT c, char dfault) const;
191
+ const charT* do_narrow(const charT* low, const charT* high, char dfault, char* dest) const;
 
192
  ```
193
 
194
  *Effects:* Applies the simplest reasonable transformation from a `charT`
195
  value or sequence of `charT` values to the corresponding `char` value or
196
  values.
197
 
198
+ For any character `c` in the basic source character set [[lex.charset]]
199
+ the transformation is such that
200
 
201
  ``` cpp
202
  do_widen(do_narrow(c, 0)) == c
203
  ```
204