tmp/tmpoaj3utgm/{from.md → to.md}
RENAMED
|
@@ -20,10 +20,12 @@ namespace std {
|
|
| 20 |
```
|
| 21 |
|
| 22 |
The contents and meaning of the header `<clocale>` are the same as the C
|
| 23 |
standard library header `<locale.h>`.
|
| 24 |
|
|
|
|
|
|
|
| 25 |
Calls to the function `setlocale` may introduce a data race
|
| 26 |
[[res.on.data.races]] with other calls to `setlocale` or with calls to
|
| 27 |
the functions listed in [[setlocale.data.races]].
|
| 28 |
|
| 29 |
See also: ISO C 7.11
|
|
@@ -52,23 +54,29 @@ See also: ISO C 7.11
|
|
| 52 |
[bitmask.types]: library.md#bitmask.types
|
| 53 |
[c.files]: input.md#c.files
|
| 54 |
[c.locales]: #c.locales
|
| 55 |
[category.collate]: #category.collate
|
| 56 |
[category.ctype]: #category.ctype
|
|
|
|
| 57 |
[category.messages]: #category.messages
|
|
|
|
| 58 |
[category.monetary]: #category.monetary
|
|
|
|
| 59 |
[category.numeric]: #category.numeric
|
|
|
|
| 60 |
[category.time]: #category.time
|
|
|
|
| 61 |
[classification]: #classification
|
|
|
|
| 62 |
[clocale.syn]: #clocale.syn
|
| 63 |
-
[conversions]: #conversions
|
| 64 |
[conversions.character]: #conversions.character
|
| 65 |
[facet.ctype.char.dtor]: #facet.ctype.char.dtor
|
| 66 |
[facet.ctype.char.members]: #facet.ctype.char.members
|
| 67 |
[facet.ctype.char.statics]: #facet.ctype.char.statics
|
| 68 |
[facet.ctype.char.virtuals]: #facet.ctype.char.virtuals
|
| 69 |
[facet.ctype.special]: #facet.ctype.special
|
|
|
|
| 70 |
[facet.num.get.members]: #facet.num.get.members
|
| 71 |
[facet.num.get.virtuals]: #facet.num.get.virtuals
|
| 72 |
[facet.num.put.members]: #facet.num.put.members
|
| 73 |
[facet.num.put.virtuals]: #facet.num.put.virtuals
|
| 74 |
[facet.numpunct]: #facet.numpunct
|
|
@@ -80,57 +88,68 @@ See also: ISO C 7.11
|
|
| 80 |
[istream.formatted.reqmts]: input.md#istream.formatted.reqmts
|
| 81 |
[iterator.requirements]: iterators.md#iterator.requirements
|
| 82 |
[lex.charset]: lex.md#lex.charset
|
| 83 |
[locale]: #locale
|
| 84 |
[locale.categories]: #locale.categories
|
|
|
|
| 85 |
[locale.category]: #locale.category
|
| 86 |
[locale.category.facets]: #locale.category.facets
|
| 87 |
[locale.codecvt]: #locale.codecvt
|
| 88 |
[locale.codecvt.byname]: #locale.codecvt.byname
|
|
|
|
| 89 |
[locale.codecvt.inout]: #locale.codecvt.inout
|
| 90 |
[locale.codecvt.members]: #locale.codecvt.members
|
| 91 |
[locale.codecvt.unshift]: #locale.codecvt.unshift
|
| 92 |
[locale.codecvt.virtuals]: #locale.codecvt.virtuals
|
| 93 |
[locale.collate]: #locale.collate
|
| 94 |
[locale.collate.byname]: #locale.collate.byname
|
|
|
|
| 95 |
[locale.collate.members]: #locale.collate.members
|
| 96 |
[locale.collate.virtuals]: #locale.collate.virtuals
|
| 97 |
[locale.cons]: #locale.cons
|
| 98 |
[locale.convenience]: #locale.convenience
|
| 99 |
[locale.ctype]: #locale.ctype
|
| 100 |
[locale.ctype.byname]: #locale.ctype.byname
|
|
|
|
| 101 |
[locale.ctype.members]: #locale.ctype.members
|
| 102 |
[locale.ctype.virtuals]: #locale.ctype.virtuals
|
| 103 |
[locale.facet]: #locale.facet
|
|
|
|
| 104 |
[locale.global.templates]: #locale.global.templates
|
| 105 |
[locale.id]: #locale.id
|
| 106 |
[locale.members]: #locale.members
|
| 107 |
[locale.messages]: #locale.messages
|
| 108 |
[locale.messages.byname]: #locale.messages.byname
|
|
|
|
| 109 |
[locale.messages.members]: #locale.messages.members
|
| 110 |
[locale.messages.virtuals]: #locale.messages.virtuals
|
| 111 |
[locale.money.get]: #locale.money.get
|
| 112 |
[locale.money.get.members]: #locale.money.get.members
|
| 113 |
[locale.money.get.virtuals]: #locale.money.get.virtuals
|
| 114 |
[locale.money.put]: #locale.money.put
|
| 115 |
[locale.money.put.members]: #locale.money.put.members
|
| 116 |
[locale.money.put.virtuals]: #locale.money.put.virtuals
|
| 117 |
[locale.moneypunct]: #locale.moneypunct
|
| 118 |
[locale.moneypunct.byname]: #locale.moneypunct.byname
|
|
|
|
| 119 |
[locale.moneypunct.members]: #locale.moneypunct.members
|
| 120 |
[locale.moneypunct.virtuals]: #locale.moneypunct.virtuals
|
| 121 |
[locale.nm.put]: #locale.nm.put
|
|
|
|
| 122 |
[locale.num.get]: #locale.num.get
|
|
|
|
| 123 |
[locale.numpunct]: #locale.numpunct
|
| 124 |
[locale.numpunct.byname]: #locale.numpunct.byname
|
|
|
|
| 125 |
[locale.operators]: #locale.operators
|
| 126 |
[locale.spec]: #locale.spec
|
| 127 |
[locale.statics]: #locale.statics
|
| 128 |
[locale.syn]: #locale.syn
|
| 129 |
[locale.time.get]: #locale.time.get
|
| 130 |
[locale.time.get.byname]: #locale.time.get.byname
|
| 131 |
[locale.time.get.dogetdate]: #locale.time.get.dogetdate
|
|
|
|
| 132 |
[locale.time.get.members]: #locale.time.get.members
|
| 133 |
[locale.time.get.virtuals]: #locale.time.get.virtuals
|
| 134 |
[locale.time.put]: #locale.time.put
|
| 135 |
[locale.time.put.byname]: #locale.time.put.byname
|
| 136 |
[locale.time.put.members]: #locale.time.put.members
|
|
@@ -146,12 +165,12 @@ See also: ISO C 7.11
|
|
| 146 |
[setlocale.data.races]: #setlocale.data.races
|
| 147 |
[tab:locale.category.facets]: #tab:locale.category.facets
|
| 148 |
[tab:locale.spec]: #tab:locale.spec
|
| 149 |
[vector]: containers.md#vector
|
| 150 |
|
| 151 |
-
[^1]: In this subclause, the type name `
|
| 152 |
-
|
| 153 |
|
| 154 |
[^2]: Note that in the call to `put`, the stream is implicitly converted
|
| 155 |
to an `ostreambuf_iterator<charT, traits>`.
|
| 156 |
|
| 157 |
[^3]: This is a complete list of requirements; there are no other
|
|
@@ -159,11 +178,11 @@ See also: ISO C 7.11
|
|
| 159 |
constructor, assignment, default constructor, destructor, etc.
|
| 160 |
|
| 161 |
[^4]: When used in a loop, it is faster to cache the `ctype<>` facet and
|
| 162 |
use it directly, or use the vector form of `ctype<>::is`.
|
| 163 |
|
| 164 |
-
[^5]: The
|
| 165 |
derived from *character-literal*s for conversion to the locale’s
|
| 166 |
encoding.
|
| 167 |
|
| 168 |
[^6]: In other words, the transformed character is not a member of any
|
| 169 |
character classification that `c` is not also a member of.
|
|
@@ -172,20 +191,20 @@ See also: ISO C 7.11
|
|
| 172 |
provided. The specialization is specified in the standard, and not
|
| 173 |
left as an implementation detail, because it affects the derivation
|
| 174 |
interface for `ctype<char>`.
|
| 175 |
|
| 176 |
[^8]: Informally, this means that `basic_filebuf` assumes that the
|
| 177 |
-
mappings from internal to external characters is 1 to N:
|
| 178 |
-
facet that is used by `basic_filebuf`
|
| 179 |
characters one internal character at a time.
|
| 180 |
|
| 181 |
[^9]: Typically these will be characters to return the state to
|
| 182 |
`stateT()`.
|
| 183 |
|
| 184 |
[^10]: If `encoding()` yields `-1`, then more than `max_length()`
|
| 185 |
-
`externT` elements
|
| 186 |
-
character, and additional `externT` elements
|
| 187 |
of a sequence after those that yield the final `internT` character.
|
| 188 |
|
| 189 |
[^11]: Parsing `"-1"` correctly into, e.g., an `unsigned short` requires
|
| 190 |
that the corresponding member `get()` at least extract the sign
|
| 191 |
before delegating.
|
|
@@ -204,33 +223,27 @@ See also: ISO C 7.11
|
|
| 204 |
parsing of user-entered dates and times, but machine-generated
|
| 205 |
formats can be parsed reliably. This allows parsers to be aggressive
|
| 206 |
about interpreting user variations on standard formats.
|
| 207 |
|
| 208 |
[^16]: This function is intended as a convenience only, for common
|
| 209 |
-
formats, and
|
| 210 |
|
| 211 |
[^17]: Although the C programming language defines no modifiers, most
|
| 212 |
vendors do.
|
| 213 |
|
| 214 |
-
[^18]:
|
| 215 |
-
implementation-defined, but should follow POSIX conventions.
|
| 216 |
|
| 217 |
-
[^19]:
|
| 218 |
-
these definitions.
|
| 219 |
-
|
| 220 |
-
[^20]: The semantics here are different from `ct.narrow`.
|
| 221 |
-
|
| 222 |
-
[^21]: An array of `char`, rather than an array of `part`, is specified
|
| 223 |
for `pattern::field` purely for efficiency.
|
| 224 |
|
| 225 |
-
[^
|
| 226 |
|
| 227 |
-
[^
|
| 228 |
|
| 229 |
-
[^
|
| 230 |
|
| 231 |
-
[^
|
| 232 |
|
| 233 |
-
[^
|
| 234 |
|
| 235 |
-
[^
|
| 236 |
usually contains a space, itself; for example, `"USD "`.
|
|
|
|
| 20 |
```
|
| 21 |
|
| 22 |
The contents and meaning of the header `<clocale>` are the same as the C
|
| 23 |
standard library header `<locale.h>`.
|
| 24 |
|
| 25 |
+
### Data races <a id="clocale.data.races">[[clocale.data.races]]</a>
|
| 26 |
+
|
| 27 |
Calls to the function `setlocale` may introduce a data race
|
| 28 |
[[res.on.data.races]] with other calls to `setlocale` or with calls to
|
| 29 |
the functions listed in [[setlocale.data.races]].
|
| 30 |
|
| 31 |
See also: ISO C 7.11
|
|
|
|
| 54 |
[bitmask.types]: library.md#bitmask.types
|
| 55 |
[c.files]: input.md#c.files
|
| 56 |
[c.locales]: #c.locales
|
| 57 |
[category.collate]: #category.collate
|
| 58 |
[category.ctype]: #category.ctype
|
| 59 |
+
[category.ctype.general]: #category.ctype.general
|
| 60 |
[category.messages]: #category.messages
|
| 61 |
+
[category.messages.general]: #category.messages.general
|
| 62 |
[category.monetary]: #category.monetary
|
| 63 |
+
[category.monetary.general]: #category.monetary.general
|
| 64 |
[category.numeric]: #category.numeric
|
| 65 |
+
[category.numeric.general]: #category.numeric.general
|
| 66 |
[category.time]: #category.time
|
| 67 |
+
[category.time.general]: #category.time.general
|
| 68 |
[classification]: #classification
|
| 69 |
+
[clocale.data.races]: #clocale.data.races
|
| 70 |
[clocale.syn]: #clocale.syn
|
|
|
|
| 71 |
[conversions.character]: #conversions.character
|
| 72 |
[facet.ctype.char.dtor]: #facet.ctype.char.dtor
|
| 73 |
[facet.ctype.char.members]: #facet.ctype.char.members
|
| 74 |
[facet.ctype.char.statics]: #facet.ctype.char.statics
|
| 75 |
[facet.ctype.char.virtuals]: #facet.ctype.char.virtuals
|
| 76 |
[facet.ctype.special]: #facet.ctype.special
|
| 77 |
+
[facet.ctype.special.general]: #facet.ctype.special.general
|
| 78 |
[facet.num.get.members]: #facet.num.get.members
|
| 79 |
[facet.num.get.virtuals]: #facet.num.get.virtuals
|
| 80 |
[facet.num.put.members]: #facet.num.put.members
|
| 81 |
[facet.num.put.virtuals]: #facet.num.put.virtuals
|
| 82 |
[facet.numpunct]: #facet.numpunct
|
|
|
|
| 88 |
[istream.formatted.reqmts]: input.md#istream.formatted.reqmts
|
| 89 |
[iterator.requirements]: iterators.md#iterator.requirements
|
| 90 |
[lex.charset]: lex.md#lex.charset
|
| 91 |
[locale]: #locale
|
| 92 |
[locale.categories]: #locale.categories
|
| 93 |
+
[locale.categories.general]: #locale.categories.general
|
| 94 |
[locale.category]: #locale.category
|
| 95 |
[locale.category.facets]: #locale.category.facets
|
| 96 |
[locale.codecvt]: #locale.codecvt
|
| 97 |
[locale.codecvt.byname]: #locale.codecvt.byname
|
| 98 |
+
[locale.codecvt.general]: #locale.codecvt.general
|
| 99 |
[locale.codecvt.inout]: #locale.codecvt.inout
|
| 100 |
[locale.codecvt.members]: #locale.codecvt.members
|
| 101 |
[locale.codecvt.unshift]: #locale.codecvt.unshift
|
| 102 |
[locale.codecvt.virtuals]: #locale.codecvt.virtuals
|
| 103 |
[locale.collate]: #locale.collate
|
| 104 |
[locale.collate.byname]: #locale.collate.byname
|
| 105 |
+
[locale.collate.general]: #locale.collate.general
|
| 106 |
[locale.collate.members]: #locale.collate.members
|
| 107 |
[locale.collate.virtuals]: #locale.collate.virtuals
|
| 108 |
[locale.cons]: #locale.cons
|
| 109 |
[locale.convenience]: #locale.convenience
|
| 110 |
[locale.ctype]: #locale.ctype
|
| 111 |
[locale.ctype.byname]: #locale.ctype.byname
|
| 112 |
+
[locale.ctype.general]: #locale.ctype.general
|
| 113 |
[locale.ctype.members]: #locale.ctype.members
|
| 114 |
[locale.ctype.virtuals]: #locale.ctype.virtuals
|
| 115 |
[locale.facet]: #locale.facet
|
| 116 |
+
[locale.general]: #locale.general
|
| 117 |
[locale.global.templates]: #locale.global.templates
|
| 118 |
[locale.id]: #locale.id
|
| 119 |
[locale.members]: #locale.members
|
| 120 |
[locale.messages]: #locale.messages
|
| 121 |
[locale.messages.byname]: #locale.messages.byname
|
| 122 |
+
[locale.messages.general]: #locale.messages.general
|
| 123 |
[locale.messages.members]: #locale.messages.members
|
| 124 |
[locale.messages.virtuals]: #locale.messages.virtuals
|
| 125 |
[locale.money.get]: #locale.money.get
|
| 126 |
[locale.money.get.members]: #locale.money.get.members
|
| 127 |
[locale.money.get.virtuals]: #locale.money.get.virtuals
|
| 128 |
[locale.money.put]: #locale.money.put
|
| 129 |
[locale.money.put.members]: #locale.money.put.members
|
| 130 |
[locale.money.put.virtuals]: #locale.money.put.virtuals
|
| 131 |
[locale.moneypunct]: #locale.moneypunct
|
| 132 |
[locale.moneypunct.byname]: #locale.moneypunct.byname
|
| 133 |
+
[locale.moneypunct.general]: #locale.moneypunct.general
|
| 134 |
[locale.moneypunct.members]: #locale.moneypunct.members
|
| 135 |
[locale.moneypunct.virtuals]: #locale.moneypunct.virtuals
|
| 136 |
[locale.nm.put]: #locale.nm.put
|
| 137 |
+
[locale.nm.put.general]: #locale.nm.put.general
|
| 138 |
[locale.num.get]: #locale.num.get
|
| 139 |
+
[locale.num.get.general]: #locale.num.get.general
|
| 140 |
[locale.numpunct]: #locale.numpunct
|
| 141 |
[locale.numpunct.byname]: #locale.numpunct.byname
|
| 142 |
+
[locale.numpunct.general]: #locale.numpunct.general
|
| 143 |
[locale.operators]: #locale.operators
|
| 144 |
[locale.spec]: #locale.spec
|
| 145 |
[locale.statics]: #locale.statics
|
| 146 |
[locale.syn]: #locale.syn
|
| 147 |
[locale.time.get]: #locale.time.get
|
| 148 |
[locale.time.get.byname]: #locale.time.get.byname
|
| 149 |
[locale.time.get.dogetdate]: #locale.time.get.dogetdate
|
| 150 |
+
[locale.time.get.general]: #locale.time.get.general
|
| 151 |
[locale.time.get.members]: #locale.time.get.members
|
| 152 |
[locale.time.get.virtuals]: #locale.time.get.virtuals
|
| 153 |
[locale.time.put]: #locale.time.put
|
| 154 |
[locale.time.put.byname]: #locale.time.put.byname
|
| 155 |
[locale.time.put.members]: #locale.time.put.members
|
|
|
|
| 165 |
[setlocale.data.races]: #setlocale.data.races
|
| 166 |
[tab:locale.category.facets]: #tab:locale.category.facets
|
| 167 |
[tab:locale.spec]: #tab:locale.spec
|
| 168 |
[vector]: containers.md#vector
|
| 169 |
|
| 170 |
+
[^1]: In this subclause, the type name `tm` is an incomplete type that
|
| 171 |
+
is defined in `<ctime>`.
|
| 172 |
|
| 173 |
[^2]: Note that in the call to `put`, the stream is implicitly converted
|
| 174 |
to an `ostreambuf_iterator<charT, traits>`.
|
| 175 |
|
| 176 |
[^3]: This is a complete list of requirements; there are no other
|
|
|
|
| 178 |
constructor, assignment, default constructor, destructor, etc.
|
| 179 |
|
| 180 |
[^4]: When used in a loop, it is faster to cache the `ctype<>` facet and
|
| 181 |
use it directly, or use the vector form of `ctype<>::is`.
|
| 182 |
|
| 183 |
+
[^5]: The parameter `c` of `do_widen` is intended to accept values
|
| 184 |
derived from *character-literal*s for conversion to the locale’s
|
| 185 |
encoding.
|
| 186 |
|
| 187 |
[^6]: In other words, the transformed character is not a member of any
|
| 188 |
character classification that `c` is not also a member of.
|
|
|
|
| 191 |
provided. The specialization is specified in the standard, and not
|
| 192 |
left as an implementation detail, because it affects the derivation
|
| 193 |
interface for `ctype<char>`.
|
| 194 |
|
| 195 |
[^8]: Informally, this means that `basic_filebuf` assumes that the
|
| 196 |
+
mappings from internal to external characters is 1 to N: that a
|
| 197 |
+
`codecvt` facet that is used by `basic_filebuf` can translate
|
| 198 |
characters one internal character at a time.
|
| 199 |
|
| 200 |
[^9]: Typically these will be characters to return the state to
|
| 201 |
`stateT()`.
|
| 202 |
|
| 203 |
[^10]: If `encoding()` yields `-1`, then more than `max_length()`
|
| 204 |
+
`externT` elements can be consumed when producing a single `internT`
|
| 205 |
+
character, and additional `externT` elements can appear at the end
|
| 206 |
of a sequence after those that yield the final `internT` character.
|
| 207 |
|
| 208 |
[^11]: Parsing `"-1"` correctly into, e.g., an `unsigned short` requires
|
| 209 |
that the corresponding member `get()` at least extract the sign
|
| 210 |
before delegating.
|
|
|
|
| 223 |
parsing of user-entered dates and times, but machine-generated
|
| 224 |
formats can be parsed reliably. This allows parsers to be aggressive
|
| 225 |
about interpreting user variations on standard formats.
|
| 226 |
|
| 227 |
[^16]: This function is intended as a convenience only, for common
|
| 228 |
+
formats, and can return `no_order` in valid locales.
|
| 229 |
|
| 230 |
[^17]: Although the C programming language defines no modifiers, most
|
| 231 |
vendors do.
|
| 232 |
|
| 233 |
+
[^18]: The semantics here are different from `ct.narrow`.
|
|
|
|
| 234 |
|
| 235 |
+
[^19]: An array of `char`, rather than an array of `part`, is specified
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
for `pattern::field` purely for efficiency.
|
| 237 |
|
| 238 |
+
[^20]: In common U.S. locales this is `’.’`.
|
| 239 |
|
| 240 |
+
[^21]: In common U.S. locales this is `’,’`.
|
| 241 |
|
| 242 |
+
[^22]: To specify grouping by 3s, the value is `"\003"` *not* `"3"`.
|
| 243 |
|
| 244 |
+
[^23]: This is usually the empty string.
|
| 245 |
|
| 246 |
+
[^24]: In common U.S. locales, this is 2.
|
| 247 |
|
| 248 |
+
[^25]: Note that the international symbol returned by `do_curr_symbol()`
|
| 249 |
usually contains a space, itself; for example, `"USD "`.
|