/
22.3.1.1.1 Type locale__category [locale.category].txt
124 lines (101 loc) · 8.92 KB
/
22.3.1.1.1 Type locale__category [locale.category].txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
22.3.1.1.1 Type locale::category [locale.category]
typedef int category;
1 Valid category values include the locale member bitmask elements collate, ctype, monetary, numeric, time, and messages, each of which represents a single locale category. In addition, locale member bitmask constant none is defined as zero and represents no category. And locale member bitmask constant all is defined such that the expression
(collate | ctype | monetary | numeric | time | messages | all) == all
is true, and represents the union of all categories. Further, the expression (X | Y), where X and Y each represent a single category, represents the union of the two categories.
typedef int category;
1 有効な category 値は各々が単独のロカールカテゴリーを表現する、ロカールメンバーのビットマスク要素 collate 、 ctype 、 monetary 、 numeric 、 time 、 messages を含む。そのほかに、ロカールメンバーのビットマスク定数値 none は零として定義されどのカテゴリーも表わさない。そしてロカールメンバーのビットマスク定数値 all は以下の式、
(collate | ctype | monetary | numeric | time | messages | all) == all
が真であるように定義され、すべてのカテゴリーの集合を示す。さらに、 X と Y がそれぞれ単独のカテゴリーを示すとき、式 (X | Y) はふたつのカテゴリーの集合を示す。
Table 76 — Locale category facets
Category Includes facets
collate collate<char>, collate<wchar_t>
ctype ctype<char>, ctype<wchar_t>
codecvt<char,char,mbstate_t>
codecvt<char16_t,char,mbstate_t>
codecvt<char32_t,char,mbstate_t>
codecvt<wchar_t,char,mbstate_t>
monetary moneypunct<char>, moneypunct<wchar_t>
moneypunct<char,true>, moneypunct<wchar_t,true>
money_get<char>, money_get<wchar_t>
money_put<char>, money_put<wchar_t>
numeric numpunct<char>, numpunct<wchar_t>
num_get<char>, num_get<wchar_t>
num_put<char>, num_put<wchar_t>
time time_get<char>, time_get<wchar_t>
time_put<char>, time_put<wchar_t>
messages messages<char>, messages<wchar_t>
2 locale member functions expecting a category argument require one of the category values defined above, or the union of two or more such values. Such a category value identifies a set of locale categories. Each locale category, in turn, identifies a set of locale facets, including at least those shown in Table 76.
表 76 — ロカールカテゴリーファセット
Category Includes facets
collate collate<char>, collate<wchar_t>
ctype ctype<char>, ctype<wchar_t>
codecvt<char,char,mbstate_t>
codecvt<char16_t,char,mbstate_t>
codecvt<char32_t,char,mbstate_t>
codecvt<wchar_t,char,mbstate_t>
monetary moneypunct<char>, moneypunct<wchar_t>
moneypunct<char,true>, moneypunct<wchar_t,true>
money_get<char>, money_get<wchar_t>
money_put<char>, money_put<wchar_t>
numeric numpunct<char>, numpunct<wchar_t>
num_get<char>, num_get<wchar_t>
num_put<char>, num_put<wchar_t>
time time_get<char>, time_get<wchar_t>
time_put<char>, time_put<wchar_t>
messages messages<char>, messages<wchar_t>
2 category 引数を要求するロカールメンバー関数は上記で定義されている category 値、もしくはそれらのふたつ以上の集合を必要とする。このような category 値はロカールカテゴリーの集合を特定する。同様に、各々のロカールカテゴリーは少なくとも表 76 において示されているロカールファセットの集合を特定する。
3 For any locale loc either constructed, or returned by locale::classic(), and any facet Facet shown in Table 76, has_facet<Facet>(loc) is true. Each locale member function which takes a locale::category argument operates on the corresponding set of facets.
3 構築された、もしくは locale::classic() からの返された任意のロカール loc 、もしくは表 76 で示されている任意のファセット Facet において、 has_facet<Facet>(loc) は真となる。 locale::category 引数を取る各々のロカールメンバー関数は対応するファセットの集合を操作する。
Table 77 — Required specializations
Category Includes facets
collate collate_byname<char>, collate_byname<wchar_t>
ctype ctype_byname<char>, ctype_byname<wchar_t>
codecvt_byname<char,char,mbstate_t>
codecvt_byname<char16_t,char,mbstate_t>
codecvt_byname<char32_t,char,mbstate_t>
codecvt_byname<wchar_t,char,mbstate_t>
monetary moneypunct_byname<char,International>
moneypunct_byname<wchar_t,International>
money_get<C,InputIterator>
money_put<C,OutputIterator>
numeric numpunct_byname<char>, numpunct_byname<wchar_t>
num_get<C,InputIterator>, num_put<C,OutputIterator>
time time_get<char,InputIterator>
time_get_byname<char,InputIterator>
time_get<wchar_t,InputIterator>
time_get_byname<wchar_t,InputIterator>
time_put<char,OutputIterator>
time_put_byname<char,OutputIterator>
time_put<wchar_t,OutputIterator>
time_put_byname<wchar_t,OutputIterator>
messages messages_byname<char>, messages_byname<wchar_t>
4 An implementation is required to provide those specializations for facet templates identified as members of a category, and for those shown in Table 77.
表 77 — 必須な特殊化
Category Includes facets
collate collate_byname<char>, collate_byname<wchar_t>
ctype ctype_byname<char>, ctype_byname<wchar_t>
codecvt_byname<char,char,mbstate_t>
codecvt_byname<char16_t,char,mbstate_t>
codecvt_byname<char32_t,char,mbstate_t>
codecvt_byname<wchar_t,char,mbstate_t>
monetary moneypunct_byname<char,International>
moneypunct_byname<wchar_t,International>
money_get<C,InputIterator>
money_put<C,OutputIterator>
numeric numpunct_byname<char>, numpunct_byname<wchar_t>
num_get<C,InputIterator>, num_put<C,OutputIterator>
time time_get<char,InputIterator>
time_get_byname<char,InputIterator>
time_get<wchar_t,InputIterator>
time_get_byname<wchar_t,InputIterator>
time_put<char,OutputIterator>
time_put_byname<char,OutputIterator>
time_put<wchar_t,OutputIterator>
time_put_byname<wchar_t,OutputIterator>
messages messages_byname<char>, messages_byname<wchar_t>
4 処理系は表 77 において示されるカテゴリーのメンバーとして特定されるファセットテンプレートのための特殊化を提供することが必須である。
5 The provided implementation of members of facets num_get<charT> and num_put<charT> calls use_facet <F> (l) only for facet F of types numpunct<charT> and ctype<charT>, and for locale l the value obtained by calling member getloc() on the ios_base& argument to these functions.
5 ファセット num_get<charT> と num_put<charT> のメンバーの提供された処理系は型 numpunct<charT> と ctype<charT> のファセット F において、かつ iso_base& を引数としたメンバー getloc() の呼び出しによって取得された値ロカール l において、 use_facet <F> (l) のみを呼び出す。
6 In declarations of facets, a template formal parameter with name InputIterator or OutputIterator indicates the set of all possible specializations on parameters that satisfy the requirements of an Input Iterator or an Output Iterator, respectively (24.2). A template formal parameter with name C represents the set of all possible specializations on a parameter that satisfies the requirements for a character on which any of the iostream components can be instantiated. A template formal parameter with name International represents the set of all possible specializations on a bool parameter.
6 ファセットの宣言において、形式的な名前が InputIterator もしくは OutputIterator であるテンプレート引数はそれぞれ、 Input Iterator もしくは Output Iterator の要件を満たすパラメーターにおいて特殊化が可能なすべての集合を示す ( 24.2 ) 。形式的な名前が C のテンプレートパラメーターは実体化可能な iostream コンポーネントのいずれの文字においても要件を満たすパラメーターにおいて特殊化が可能なすべての集合を表現する。形式的な名前が International であるテンプレートパラメーターは真偽値のパラメーターにおいて特殊化が可能なすべての集合を表現する。