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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Data races <a id="clocale.data.races">[[clocale.data.races]]</a>
|
| 2 |
+
|
| 3 |
+
Calls to the function `setlocale` may introduce a data race
|
| 4 |
+
[[res.on.data.races]] with other calls to `setlocale` or with calls to
|
| 5 |
+
the functions listed in [[setlocale.data.races]].
|
| 6 |
+
|
| 7 |
+
See also: ISO C 7.11
|
| 8 |
+
|
| 9 |
+
**Table: Potential `setlocale` data races** <a id="setlocale.data.races">[setlocale.data.races]</a>
|
| 10 |
+
|
| 11 |
+
| | | | | |
|
| 12 |
+
| --------- | ---------- | ----------- | ------------ | ---------- |
|
| 13 |
+
| `fprintf` | `isprint` | `iswdigit` | `localeconv` | `tolower` |
|
| 14 |
+
| `fscanf` | `ispunct` | `iswgraph` | `mblen` | `toupper` |
|
| 15 |
+
| `isalnum` | `isspace` | `iswlower` | `mbstowcs` | `towlower` |
|
| 16 |
+
| `isalpha` | `isupper` | `iswprint` | `mbtowc` | `towupper` |
|
| 17 |
+
| `isblank` | `iswalnum` | `iswpunct` | `setlocale` | `wcscoll` |
|
| 18 |
+
| `iscntrl` | `iswalpha` | `iswspace` | `strcoll` | `wcstod` |
|
| 19 |
+
| `isdigit` | `iswblank` | `iswupper` | `strerror` | `wcstombs` |
|
| 20 |
+
| `isgraph` | `iswcntrl` | `iswxdigit` | `strtod` | `wcsxfrm` |
|
| 21 |
+
| `islower` | `iswctype` | `isxdigit` | `strxfrm` | `wctomb` |
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
<!-- Link reference definitions -->
|
| 26 |
+
[alg.lex.comparison]: algorithms.md#alg.lex.comparison
|
| 27 |
+
[alg.sort]: algorithms.md#alg.sort
|
| 28 |
+
[algorithms]: algorithms.md#algorithms
|
| 29 |
+
[basic.start.static]: basic.md#basic.start.static
|
| 30 |
+
[bitmask.types]: library.md#bitmask.types
|
| 31 |
+
[c.files]: input.md#c.files
|
| 32 |
+
[c.locales]: #c.locales
|
| 33 |
+
[category.collate]: #category.collate
|
| 34 |
+
[category.ctype]: #category.ctype
|
| 35 |
+
[category.ctype.general]: #category.ctype.general
|
| 36 |
+
[category.messages]: #category.messages
|
| 37 |
+
[category.messages.general]: #category.messages.general
|
| 38 |
+
[category.monetary]: #category.monetary
|
| 39 |
+
[category.monetary.general]: #category.monetary.general
|
| 40 |
+
[category.numeric]: #category.numeric
|
| 41 |
+
[category.numeric.general]: #category.numeric.general
|
| 42 |
+
[category.time]: #category.time
|
| 43 |
+
[category.time.general]: #category.time.general
|
| 44 |
+
[classification]: #classification
|
| 45 |
+
[clocale.data.races]: #clocale.data.races
|
| 46 |
+
[clocale.syn]: #clocale.syn
|
| 47 |
+
[conversions.character]: #conversions.character
|
| 48 |
+
[facet.ctype.char.dtor]: #facet.ctype.char.dtor
|
| 49 |
+
[facet.ctype.char.members]: #facet.ctype.char.members
|
| 50 |
+
[facet.ctype.char.statics]: #facet.ctype.char.statics
|
| 51 |
+
[facet.ctype.char.virtuals]: #facet.ctype.char.virtuals
|
| 52 |
+
[facet.ctype.special]: #facet.ctype.special
|
| 53 |
+
[facet.ctype.special.general]: #facet.ctype.special.general
|
| 54 |
+
[facet.num.get.members]: #facet.num.get.members
|
| 55 |
+
[facet.num.get.virtuals]: #facet.num.get.virtuals
|
| 56 |
+
[facet.num.put.members]: #facet.num.put.members
|
| 57 |
+
[facet.num.put.virtuals]: #facet.num.put.virtuals
|
| 58 |
+
[facet.numpunct]: #facet.numpunct
|
| 59 |
+
[facet.numpunct.members]: #facet.numpunct.members
|
| 60 |
+
[facet.numpunct.virtuals]: #facet.numpunct.virtuals
|
| 61 |
+
[file.streams]: input.md#file.streams
|
| 62 |
+
[ios.base]: input.md#ios.base
|
| 63 |
+
[istream.formatted]: input.md#istream.formatted
|
| 64 |
+
[istream.formatted.reqmts]: input.md#istream.formatted.reqmts
|
| 65 |
+
[iterator.requirements]: iterators.md#iterator.requirements
|
| 66 |
+
[lex.charset]: lex.md#lex.charset
|
| 67 |
+
[locale]: #locale
|
| 68 |
+
[locale.categories]: #locale.categories
|
| 69 |
+
[locale.categories.general]: #locale.categories.general
|
| 70 |
+
[locale.category]: #locale.category
|
| 71 |
+
[locale.category.facets]: #locale.category.facets
|
| 72 |
+
[locale.codecvt]: #locale.codecvt
|
| 73 |
+
[locale.codecvt.byname]: #locale.codecvt.byname
|
| 74 |
+
[locale.codecvt.general]: #locale.codecvt.general
|
| 75 |
+
[locale.codecvt.inout]: #locale.codecvt.inout
|
| 76 |
+
[locale.codecvt.members]: #locale.codecvt.members
|
| 77 |
+
[locale.codecvt.unshift]: #locale.codecvt.unshift
|
| 78 |
+
[locale.codecvt.virtuals]: #locale.codecvt.virtuals
|
| 79 |
+
[locale.collate]: #locale.collate
|
| 80 |
+
[locale.collate.byname]: #locale.collate.byname
|
| 81 |
+
[locale.collate.general]: #locale.collate.general
|
| 82 |
+
[locale.collate.members]: #locale.collate.members
|
| 83 |
+
[locale.collate.virtuals]: #locale.collate.virtuals
|
| 84 |
+
[locale.cons]: #locale.cons
|
| 85 |
+
[locale.convenience]: #locale.convenience
|
| 86 |
+
[locale.ctype]: #locale.ctype
|
| 87 |
+
[locale.ctype.byname]: #locale.ctype.byname
|
| 88 |
+
[locale.ctype.general]: #locale.ctype.general
|
| 89 |
+
[locale.ctype.members]: #locale.ctype.members
|
| 90 |
+
[locale.ctype.virtuals]: #locale.ctype.virtuals
|
| 91 |
+
[locale.facet]: #locale.facet
|
| 92 |
+
[locale.general]: #locale.general
|
| 93 |
+
[locale.global.templates]: #locale.global.templates
|
| 94 |
+
[locale.id]: #locale.id
|
| 95 |
+
[locale.members]: #locale.members
|
| 96 |
+
[locale.messages]: #locale.messages
|
| 97 |
+
[locale.messages.byname]: #locale.messages.byname
|
| 98 |
+
[locale.messages.general]: #locale.messages.general
|
| 99 |
+
[locale.messages.members]: #locale.messages.members
|
| 100 |
+
[locale.messages.virtuals]: #locale.messages.virtuals
|
| 101 |
+
[locale.money.get]: #locale.money.get
|
| 102 |
+
[locale.money.get.members]: #locale.money.get.members
|
| 103 |
+
[locale.money.get.virtuals]: #locale.money.get.virtuals
|
| 104 |
+
[locale.money.put]: #locale.money.put
|
| 105 |
+
[locale.money.put.members]: #locale.money.put.members
|
| 106 |
+
[locale.money.put.virtuals]: #locale.money.put.virtuals
|
| 107 |
+
[locale.moneypunct]: #locale.moneypunct
|
| 108 |
+
[locale.moneypunct.byname]: #locale.moneypunct.byname
|
| 109 |
+
[locale.moneypunct.general]: #locale.moneypunct.general
|
| 110 |
+
[locale.moneypunct.members]: #locale.moneypunct.members
|
| 111 |
+
[locale.moneypunct.virtuals]: #locale.moneypunct.virtuals
|
| 112 |
+
[locale.nm.put]: #locale.nm.put
|
| 113 |
+
[locale.nm.put.general]: #locale.nm.put.general
|
| 114 |
+
[locale.num.get]: #locale.num.get
|
| 115 |
+
[locale.num.get.general]: #locale.num.get.general
|
| 116 |
+
[locale.numpunct]: #locale.numpunct
|
| 117 |
+
[locale.numpunct.byname]: #locale.numpunct.byname
|
| 118 |
+
[locale.numpunct.general]: #locale.numpunct.general
|
| 119 |
+
[locale.operators]: #locale.operators
|
| 120 |
+
[locale.spec]: #locale.spec
|
| 121 |
+
[locale.statics]: #locale.statics
|
| 122 |
+
[locale.syn]: #locale.syn
|
| 123 |
+
[locale.time.get]: #locale.time.get
|
| 124 |
+
[locale.time.get.byname]: #locale.time.get.byname
|
| 125 |
+
[locale.time.get.dogetdate]: #locale.time.get.dogetdate
|
| 126 |
+
[locale.time.get.general]: #locale.time.get.general
|
| 127 |
+
[locale.time.get.members]: #locale.time.get.members
|
| 128 |
+
[locale.time.get.virtuals]: #locale.time.get.virtuals
|
| 129 |
+
[locale.time.put]: #locale.time.put
|
| 130 |
+
[locale.time.put.byname]: #locale.time.put.byname
|
| 131 |
+
[locale.time.put.members]: #locale.time.put.members
|
| 132 |
+
[locale.time.put.virtuals]: #locale.time.put.virtuals
|
| 133 |
+
[locale.types]: #locale.types
|
| 134 |
+
[locales]: #locales
|
| 135 |
+
[localization]: #localization
|
| 136 |
+
[localization.general]: #localization.general
|
| 137 |
+
[localization.summary]: #localization.summary
|
| 138 |
+
[ostream.formatted.reqmts]: input.md#ostream.formatted.reqmts
|
| 139 |
+
[res.on.data.races]: library.md#res.on.data.races
|
| 140 |
+
[sequence.reqmts]: containers.md#sequence.reqmts
|
| 141 |
+
[setlocale.data.races]: #setlocale.data.races
|
| 142 |
+
[tab:locale.category.facets]: #tab:locale.category.facets
|
| 143 |
+
[tab:locale.spec]: #tab:locale.spec
|
| 144 |
+
[vector]: containers.md#vector
|
| 145 |
+
|
| 146 |
+
[^1]: In this subclause, the type name `tm` is an incomplete type that
|
| 147 |
+
is defined in `<ctime>`.
|
| 148 |
+
|
| 149 |
+
[^2]: Note that in the call to `put`, the stream is implicitly converted
|
| 150 |
+
to an `ostreambuf_iterator<charT, traits>`.
|
| 151 |
+
|
| 152 |
+
[^3]: This is a complete list of requirements; there are no other
|
| 153 |
+
requirements. Thus, a facet class need not have a public copy
|
| 154 |
+
constructor, assignment, default constructor, destructor, etc.
|
| 155 |
+
|
| 156 |
+
[^4]: When used in a loop, it is faster to cache the `ctype<>` facet and
|
| 157 |
+
use it directly, or use the vector form of `ctype<>::is`.
|
| 158 |
+
|
| 159 |
+
[^5]: The parameter `c` of `do_widen` is intended to accept values
|
| 160 |
+
derived from *character-literal*s for conversion to the locale’s
|
| 161 |
+
encoding.
|
| 162 |
+
|
| 163 |
+
[^6]: In other words, the transformed character is not a member of any
|
| 164 |
+
character classification that `c` is not also a member of.
|
| 165 |
+
|
| 166 |
+
[^7]: Only the `char` (not `unsigned char` and `signed char`) form is
|
| 167 |
+
provided. The specialization is specified in the standard, and not
|
| 168 |
+
left as an implementation detail, because it affects the derivation
|
| 169 |
+
interface for `ctype<char>`.
|
| 170 |
+
|
| 171 |
+
[^8]: Informally, this means that `basic_filebuf` assumes that the
|
| 172 |
+
mappings from internal to external characters is 1 to N: that a
|
| 173 |
+
`codecvt` facet that is used by `basic_filebuf` can translate
|
| 174 |
+
characters one internal character at a time.
|
| 175 |
+
|
| 176 |
+
[^9]: Typically these will be characters to return the state to
|
| 177 |
+
`stateT()`.
|
| 178 |
+
|
| 179 |
+
[^10]: If `encoding()` yields `-1`, then more than `max_length()`
|
| 180 |
+
`externT` elements can be consumed when producing a single `internT`
|
| 181 |
+
character, and additional `externT` elements can appear at the end
|
| 182 |
+
of a sequence after those that yield the final `internT` character.
|
| 183 |
+
|
| 184 |
+
[^11]: Parsing `"-1"` correctly into, e.g., an `unsigned short` requires
|
| 185 |
+
that the corresponding member `get()` at least extract the sign
|
| 186 |
+
before delegating.
|
| 187 |
+
|
| 188 |
+
[^12]: The conversion specification `#o` generates a leading `0` which
|
| 189 |
+
is *not* a padding character.
|
| 190 |
+
|
| 191 |
+
[^13]: Thus, the string `"\003"` specifies groups of 3 digits each, and
|
| 192 |
+
`"3"` probably indicates groups of 51 (!) digits each, because 51 is
|
| 193 |
+
the ASCII value of `"3"`.
|
| 194 |
+
|
| 195 |
+
[^14]: This function is useful when one string is being compared to many
|
| 196 |
+
other strings.
|
| 197 |
+
|
| 198 |
+
[^15]: In other words, user confirmation is required for reliable
|
| 199 |
+
parsing of user-entered dates and times, but machine-generated
|
| 200 |
+
formats can be parsed reliably. This allows parsers to be aggressive
|
| 201 |
+
about interpreting user variations on standard formats.
|
| 202 |
+
|
| 203 |
+
[^16]: This function is intended as a convenience only, for common
|
| 204 |
+
formats, and can return `no_order` in valid locales.
|
| 205 |
+
|
| 206 |
+
[^17]: Although the C programming language defines no modifiers, most
|
| 207 |
+
vendors do.
|
| 208 |
+
|
| 209 |
+
[^18]: The semantics here are different from `ct.narrow`.
|
| 210 |
+
|
| 211 |
+
[^19]: An array of `char`, rather than an array of `part`, is specified
|
| 212 |
+
for `pattern::field` purely for efficiency.
|
| 213 |
+
|
| 214 |
+
[^20]: In common U.S. locales this is `’.’`.
|
| 215 |
+
|
| 216 |
+
[^21]: In common U.S. locales this is `’,’`.
|
| 217 |
+
|
| 218 |
+
[^22]: To specify grouping by 3s, the value is `"\003"` *not* `"3"`.
|
| 219 |
+
|
| 220 |
+
[^23]: This is usually the empty string.
|
| 221 |
+
|
| 222 |
+
[^24]: In common U.S. locales, this is 2.
|
| 223 |
+
|
| 224 |
+
[^25]: Note that the international symbol returned by `do_curr_symbol()`
|
| 225 |
+
usually contains a space, itself; for example, `"USD "`.
|