From Jason Turner

[locale.types]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmppe0gezwb/{from.md → to.md} +23 -24
tmp/tmppe0gezwb/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
1
- #### `locale` 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;
@@ -25,22 +25,21 @@ category, represents the union of the two categories.
25
 
26
  member functions expecting a `category` argument require one of the
27
  `category` values defined above, or the union of two or more such
28
  values. Such a `category` value identifies a set of locale categories.
29
  Each locale category, in turn, identifies a set of locale facets,
30
- including at least those shown in Table 
31
- [[tab:localization.category.facets]].
32
 
33
- **Table: Locale category facets** <a id="tab:localization.category.facets">[tab:localization.category.facets]</a>
34
 
35
  | Category | Includes facets |
36
  | -------- | ----------------------------------------------------- |
37
  | collate | `collate<char>`, `collate<wchar_t>` |
38
  | ctype | `ctype<char>`, `ctype<wchar_t>` |
39
  | | `codecvt<char, char, mbstate_t>` |
40
- | | `codecvt<char16_t, char, mbstate_t>` |
41
- | | `codecvt<char32_t, char, mbstate_t>` |
42
  | | `codecvt<wchar_t, char, mbstate_t>` |
43
  | monetary | `moneypunct<char>`, `moneypunct<wchar_t>` |
44
  | | `moneypunct<char, true>`, `moneypunct<wchar_t, true>` |
45
  | | `money_get<char>`, `money_get<wchar_t>` |
46
  | | `money_put<char>`, `money_put<wchar_t>` |
@@ -51,28 +50,28 @@ including at least those shown in Table 
51
  | | `time_put<char>`, `time_put<wchar_t>` |
52
  | messages | `messages<char>`, `messages<wchar_t>` |
53
 
54
 
55
  For any locale `loc` either constructed, or returned by
56
- `locale::classic()`, and any facet `Facet` shown in Table 
57
- [[tab:localization.category.facets]], `has_facet<Facet>(loc)` is `true`.
58
- Each `locale` member function which takes a `locale::category` argument
59
  operates on the corresponding set of facets.
60
 
61
  An implementation is required to provide those specializations for facet
62
  templates identified as members of a category, and for those shown in
63
- Table  [[tab:localization.required.specializations]].
64
 
65
- **Table: Required specializations** <a id="tab:localization.required.specializations">[tab:localization.required.specializations]</a>
66
 
67
  | Category | Includes facets |
68
  | -------- | --------------------------------------------------------- |
69
  | collate | `collate_byname<char>`, `collate_byname<wchar_t>` |
70
  | ctype | `ctype_byname<char>`, `ctype_byname<wchar_t>` |
71
  | | `codecvt_byname<char, char, mbstate_t>` |
72
- | | `codecvt_byname<char16_t, char, mbstate_t>` |
73
- | | `codecvt_byname<char32_t, char, mbstate_t>` |
74
  | | `codecvt_byname<wchar_t, char, mbstate_t>` |
75
  | monetary | `moneypunct_byname<char, International>` |
76
  | | `moneypunct_byname<wchar_t, International>` |
77
  | | `money_get<C, InputIterator>` |
78
  | | `money_put<C, OutputIterator>` |
@@ -95,18 +94,18 @@ The provided implementation of members of facets `num_get<charT>` and
95
  obtained by calling member `getloc()` on the `ios_base&` argument to
96
  these functions.
97
 
98
  In declarations of facets, a template parameter with name
99
  `InputIterator` or `OutputIterator` indicates the set of all possible
100
- specializations on parameters that satisfy the requirements of an Input
101
- Iterator or an Output Iterator, respectively (
102
- [[iterator.requirements]]). A template parameter with name `C`
103
- represents the set of types containing `char`, `wchar_t`, and any other
104
- *implementation-defined* character types that satisfy the requirements
105
- for a character on which any of the iostream components can be
106
- instantiated. A template parameter with name `International` represents
107
- the set of all possible specializations on a bool parameter.
108
 
109
  ##### Class `locale::facet` <a id="locale.facet">[[locale.facet]]</a>
110
 
111
  ``` cpp
112
  namespace std {
@@ -132,11 +131,11 @@ static ::std::locale::id id;
132
  Template parameters in this Clause which are required to be facets are
133
  those named `Facet` in declarations. A program that passes a type that
134
  is *not* a facet, or a type that refers to a volatile-qualified facet,
135
  as an (explicit or deduced) template parameter to a locale function
136
  expecting a facet, is ill-formed. A const-qualified facet is a valid
137
- template argument to any locale function that expects a Facet template
138
  parameter.
139
 
140
  The `refs` argument to the constructor is used for lifetime management.
141
  For `refs == 0`, the implementation performs
142
  `delete static_cast<locale::facet*>(f)` (where `f` is a pointer to the
@@ -180,8 +179,8 @@ initialization.
180
  [*Note 1*: Because facets are used by iostreams, potentially while
181
  static constructors are running, their initialization cannot depend on
182
  programmed static initialization. One initialization strategy is for
183
  `locale` to initialize each facet’s `id` member the first time an
184
  instance of the facet is installed into a locale. This depends only on
185
- static storage being zero before constructors run (
186
- [[basic.start.static]]). — *end note*]
187
 
 
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;
 
25
 
26
  member functions expecting a `category` argument require one of the
27
  `category` values defined above, or the union of two or more such
28
  values. Such a `category` value identifies a set of locale categories.
29
  Each locale category, in turn, identifies a set of locale facets,
30
+ including at least those shown in [[locale.category.facets]].
 
31
 
32
+ **Table: Locale category facets** <a id="locale.category.facets">[locale.category.facets]</a>
33
 
34
  | Category | Includes facets |
35
  | -------- | ----------------------------------------------------- |
36
  | collate | `collate<char>`, `collate<wchar_t>` |
37
  | ctype | `ctype<char>`, `ctype<wchar_t>` |
38
  | | `codecvt<char, char, mbstate_t>` |
39
+ | | `codecvt<char16_t, char8_t, mbstate_t>` |
40
+ | | `codecvt<char32_t, char8_t, mbstate_t>` |
41
  | | `codecvt<wchar_t, char, mbstate_t>` |
42
  | monetary | `moneypunct<char>`, `moneypunct<wchar_t>` |
43
  | | `moneypunct<char, true>`, `moneypunct<wchar_t, true>` |
44
  | | `money_get<char>`, `money_get<wchar_t>` |
45
  | | `money_put<char>`, `money_put<wchar_t>` |
 
50
  | | `time_put<char>`, `time_put<wchar_t>` |
51
  | messages | `messages<char>`, `messages<wchar_t>` |
52
 
53
 
54
  For any locale `loc` either constructed, or returned by
55
+ `locale::classic()`, and any facet `Facet` shown in
56
+ [[locale.category.facets]], `has_facet<Facet>(loc)` is `true`. Each
57
+ `locale` member function which takes a `locale::category` argument
58
  operates on the corresponding set of facets.
59
 
60
  An implementation is required to provide those specializations for facet
61
  templates identified as members of a category, and for those shown in
62
+ [[locale.spec]].
63
 
64
+ **Table: Required specializations** <a id="locale.spec">[locale.spec]</a>
65
 
66
  | Category | Includes facets |
67
  | -------- | --------------------------------------------------------- |
68
  | collate | `collate_byname<char>`, `collate_byname<wchar_t>` |
69
  | ctype | `ctype_byname<char>`, `ctype_byname<wchar_t>` |
70
  | | `codecvt_byname<char, char, mbstate_t>` |
71
+ | | `codecvt_byname<char16_t, char8_t, mbstate_t>` |
72
+ | | `codecvt_byname<char32_t, char8_t, mbstate_t>` |
73
  | | `codecvt_byname<wchar_t, char, mbstate_t>` |
74
  | monetary | `moneypunct_byname<char, International>` |
75
  | | `moneypunct_byname<wchar_t, International>` |
76
  | | `money_get<C, InputIterator>` |
77
  | | `money_put<C, OutputIterator>` |
 
94
  obtained by calling member `getloc()` on the `ios_base&` argument to
95
  these functions.
96
 
97
  In declarations of facets, a template parameter with name
98
  `InputIterator` or `OutputIterator` indicates the set of all possible
99
+ specializations on parameters that meet the *Cpp17InputIterator*
100
+ requirements or *Cpp17OutputIterator* requirements, respectively
101
+ [[iterator.requirements]]. A template parameter with name `C` represents
102
+ the set of types containing `char`, `wchar_t`, and any other
103
+ *implementation-defined* character types that meet the requirements for
104
+ a character on which any of the iostream components can be instantiated.
105
+ A template parameter with name `International` represents the set of all
106
+ possible specializations on a bool parameter.
107
 
108
  ##### Class `locale::facet` <a id="locale.facet">[[locale.facet]]</a>
109
 
110
  ``` cpp
111
  namespace std {
 
131
  Template parameters in this Clause which are required to be facets are
132
  those named `Facet` in declarations. A program that passes a type that
133
  is *not* a facet, or a type that refers to a volatile-qualified facet,
134
  as an (explicit or deduced) template parameter to a locale function
135
  expecting a facet, is ill-formed. A const-qualified facet is a valid
136
+ template argument to any locale function that expects a `Facet` template
137
  parameter.
138
 
139
  The `refs` argument to the constructor is used for lifetime management.
140
  For `refs == 0`, the implementation performs
141
  `delete static_cast<locale::facet*>(f)` (where `f` is a pointer to the
 
179
  [*Note 1*: Because facets are used by iostreams, potentially while
180
  static constructors are running, their initialization cannot depend on
181
  programmed static initialization. One initialization strategy is for
182
  `locale` to initialize each facet’s `id` member the first time an
183
  instance of the facet is installed into a locale. This depends only on
184
+ static storage being zero before constructors run
185
+ [[basic.start.static]]. — *end note*]
186