tmp/tmp6d6y6j5u/{from.md → to.md}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
-
#### Types <a id="locale.types">[[locale.types]]</a>
|
| 2 |
|
| 3 |
-
##### Type `locale::category` <a id="locale.category">[[locale.category]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
using category = int;
|
| 7 |
```
|
| 8 |
|
|
@@ -32,12 +32,10 @@ including at least those shown in [[locale.category.facets]].
|
|
| 32 |
| Category | Includes facets |
|
| 33 |
| -------- | ----------------------------------------------------- |
|
| 34 |
| collate | `collate<char>`, `collate<wchar_t>` |
|
| 35 |
| ctype | `ctype<char>`, `ctype<wchar_t>` |
|
| 36 |
| | `codecvt<char, char, mbstate_t>` |
|
| 37 |
-
| | `codecvt<char16_t, char8_t, mbstate_t>` |
|
| 38 |
-
| | `codecvt<char32_t, char8_t, mbstate_t>` |
|
| 39 |
| | `codecvt<wchar_t, char, mbstate_t>` |
|
| 40 |
| monetary | `moneypunct<char>`, `moneypunct<wchar_t>` |
|
| 41 |
| | `moneypunct<char, true>`, `moneypunct<wchar_t, true>` |
|
| 42 |
| | `money_get<char>`, `money_get<wchar_t>` |
|
| 43 |
| | `money_put<char>`, `money_put<wchar_t>` |
|
|
@@ -64,12 +62,10 @@ templates identified as members of a category, and for those shown in
|
|
| 64 |
| Category | Includes facets |
|
| 65 |
| -------- | --------------------------------------------------------- |
|
| 66 |
| collate | `collate_byname<char>`, `collate_byname<wchar_t>` |
|
| 67 |
| ctype | `ctype_byname<char>`, `ctype_byname<wchar_t>` |
|
| 68 |
| | `codecvt_byname<char, char, mbstate_t>` |
|
| 69 |
-
| | `codecvt_byname<char16_t, char8_t, mbstate_t>` |
|
| 70 |
-
| | `codecvt_byname<char32_t, char8_t, mbstate_t>` |
|
| 71 |
| | `codecvt_byname<wchar_t, char, mbstate_t>` |
|
| 72 |
| monetary | `moneypunct_byname<char, International>` |
|
| 73 |
| | `moneypunct_byname<wchar_t, International>` |
|
| 74 |
| | `money_get<C, InputIterator>` |
|
| 75 |
| | `money_put<C, OutputIterator>` |
|
|
@@ -96,16 +92,17 @@ In declarations of facets, a template parameter with name
|
|
| 96 |
`InputIterator` or `OutputIterator` indicates the set of all possible
|
| 97 |
specializations on parameters that meet the *Cpp17InputIterator*
|
| 98 |
requirements or *Cpp17OutputIterator* requirements, respectively
|
| 99 |
[[iterator.requirements]]. A template parameter with name `C` represents
|
| 100 |
the set of types containing `char`, `wchar_t`, and any other
|
| 101 |
-
*implementation-defined* character
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
|
|
|
| 105 |
|
| 106 |
-
##### Class `locale::facet` <a id="locale.facet">[[locale.facet]]</a>
|
| 107 |
|
| 108 |
``` cpp
|
| 109 |
namespace std {
|
| 110 |
class locale::facet {
|
| 111 |
protected:
|
|
@@ -140,11 +137,11 @@ For `refs == 0`, the implementation performs
|
|
| 140 |
facet) when the last `locale` object containing the facet is destroyed;
|
| 141 |
for `refs == 1`, the implementation never destroys the facet.
|
| 142 |
|
| 143 |
Constructors of all facets defined in this Clause take such an argument
|
| 144 |
and pass it along to their `facet` base class constructor. All
|
| 145 |
-
one-argument constructors defined in this Clause are
|
| 146 |
preventing their participation in implicit conversions.
|
| 147 |
|
| 148 |
For some standard facets a standard “…`_byname`” class, derived from it,
|
| 149 |
implements the virtual function semantics equivalent to that facet of
|
| 150 |
the locale constructed by `locale(const char*)` with the same name. Each
|
|
@@ -155,11 +152,11 @@ takes a `string` argument `str` and a `refs` argument, which has the
|
|
| 155 |
same effect as calling the first constructor with the two arguments
|
| 156 |
`str.c_str()` and `refs`. If there is no “…`_byname`” version of a
|
| 157 |
facet, the base class implements named locale semantics itself by
|
| 158 |
reference to other facets.
|
| 159 |
|
| 160 |
-
##### Class `locale::id` <a id="locale.id">[[locale.id]]</a>
|
| 161 |
|
| 162 |
``` cpp
|
| 163 |
namespace std {
|
| 164 |
class locale::id {
|
| 165 |
public:
|
|
@@ -172,11 +169,11 @@ namespace std {
|
|
| 172 |
|
| 173 |
The class `locale::id` provides identification of a locale facet
|
| 174 |
interface, used as an index for lookup and to encapsulate
|
| 175 |
initialization.
|
| 176 |
|
| 177 |
-
[*Note
|
| 178 |
static constructors are running, their initialization cannot depend on
|
| 179 |
programmed static initialization. One initialization strategy is for
|
| 180 |
`locale` to initialize each facet’s `id` member the first time an
|
| 181 |
instance of the facet is installed into a locale. This depends only on
|
| 182 |
static storage being zero before constructors run
|
|
|
|
| 1 |
+
##### Types <a id="locale.types">[[locale.types]]</a>
|
| 2 |
|
| 3 |
+
###### Type `locale::category` <a id="locale.category">[[locale.category]]</a>
|
| 4 |
|
| 5 |
``` cpp
|
| 6 |
using category = int;
|
| 7 |
```
|
| 8 |
|
|
|
|
| 32 |
| Category | Includes facets |
|
| 33 |
| -------- | ----------------------------------------------------- |
|
| 34 |
| collate | `collate<char>`, `collate<wchar_t>` |
|
| 35 |
| ctype | `ctype<char>`, `ctype<wchar_t>` |
|
| 36 |
| | `codecvt<char, char, mbstate_t>` |
|
|
|
|
|
|
|
| 37 |
| | `codecvt<wchar_t, char, mbstate_t>` |
|
| 38 |
| monetary | `moneypunct<char>`, `moneypunct<wchar_t>` |
|
| 39 |
| | `moneypunct<char, true>`, `moneypunct<wchar_t, true>` |
|
| 40 |
| | `money_get<char>`, `money_get<wchar_t>` |
|
| 41 |
| | `money_put<char>`, `money_put<wchar_t>` |
|
|
|
|
| 62 |
| Category | Includes facets |
|
| 63 |
| -------- | --------------------------------------------------------- |
|
| 64 |
| collate | `collate_byname<char>`, `collate_byname<wchar_t>` |
|
| 65 |
| ctype | `ctype_byname<char>`, `ctype_byname<wchar_t>` |
|
| 66 |
| | `codecvt_byname<char, char, mbstate_t>` |
|
|
|
|
|
|
|
| 67 |
| | `codecvt_byname<wchar_t, char, mbstate_t>` |
|
| 68 |
| monetary | `moneypunct_byname<char, International>` |
|
| 69 |
| | `moneypunct_byname<wchar_t, International>` |
|
| 70 |
| | `money_get<C, InputIterator>` |
|
| 71 |
| | `money_put<C, OutputIterator>` |
|
|
|
|
| 92 |
`InputIterator` or `OutputIterator` indicates the set of all possible
|
| 93 |
specializations on parameters that meet the *Cpp17InputIterator*
|
| 94 |
requirements or *Cpp17OutputIterator* requirements, respectively
|
| 95 |
[[iterator.requirements]]. A template parameter with name `C` represents
|
| 96 |
the set of types containing `char`, `wchar_t`, and any other
|
| 97 |
+
*implementation-defined* character container types
|
| 98 |
+
[[defns.character.container]] that meet the requirements for a character
|
| 99 |
+
on which any of the iostream components can be instantiated. A template
|
| 100 |
+
parameter with name `International` represents the set of all possible
|
| 101 |
+
specializations on a bool parameter.
|
| 102 |
|
| 103 |
+
###### Class `locale::facet` <a id="locale.facet">[[locale.facet]]</a>
|
| 104 |
|
| 105 |
``` cpp
|
| 106 |
namespace std {
|
| 107 |
class locale::facet {
|
| 108 |
protected:
|
|
|
|
| 137 |
facet) when the last `locale` object containing the facet is destroyed;
|
| 138 |
for `refs == 1`, the implementation never destroys the facet.
|
| 139 |
|
| 140 |
Constructors of all facets defined in this Clause take such an argument
|
| 141 |
and pass it along to their `facet` base class constructor. All
|
| 142 |
+
one-argument constructors defined in this Clause are explicit,
|
| 143 |
preventing their participation in implicit conversions.
|
| 144 |
|
| 145 |
For some standard facets a standard “…`_byname`” class, derived from it,
|
| 146 |
implements the virtual function semantics equivalent to that facet of
|
| 147 |
the locale constructed by `locale(const char*)` with the same name. Each
|
|
|
|
| 152 |
same effect as calling the first constructor with the two arguments
|
| 153 |
`str.c_str()` and `refs`. If there is no “…`_byname`” version of a
|
| 154 |
facet, the base class implements named locale semantics itself by
|
| 155 |
reference to other facets.
|
| 156 |
|
| 157 |
+
###### Class `locale::id` <a id="locale.id">[[locale.id]]</a>
|
| 158 |
|
| 159 |
``` cpp
|
| 160 |
namespace std {
|
| 161 |
class locale::id {
|
| 162 |
public:
|
|
|
|
| 169 |
|
| 170 |
The class `locale::id` provides identification of a locale facet
|
| 171 |
interface, used as an index for lookup and to encapsulate
|
| 172 |
initialization.
|
| 173 |
|
| 174 |
+
[*Note 2*: Because facets are used by iostreams, potentially while
|
| 175 |
static constructors are running, their initialization cannot depend on
|
| 176 |
programmed static initialization. One initialization strategy is for
|
| 177 |
`locale` to initialize each facet’s `id` member the first time an
|
| 178 |
instance of the facet is installed into a locale. This depends only on
|
| 179 |
static storage being zero before constructors run
|