/
22.3.1.4 locale operators [locale.operators].txt
45 lines (24 loc) · 1.94 KB
/
22.3.1.4 locale operators [locale.operators].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
22.3.1.4 locale operators [locale.operators]
bool operator==(const locale& other) const;
1 Returns: true if both arguments are the same locale, or one is a copy of the other, or each has a name and the names are identical; false otherwise.
1 返り値: 両方の引数が同じロカールである、一方が他方のコピーである、各々が名前を持ちそれらが一致する場合、真。そうでない場合、偽。
bool operator!=(const locale& other) const;
2 Returns: The result of the expression: !(*this == other).
2 返り値: 式 !(*this == other) の結果。
template <class charT, class Traits, class Allocator>
bool operator()(const basic_string<charT,Traits,Allocator>& s1,
const basic_string<charT,Traits,Allocator>& s2) const;
3 Effects: Compares two strings according to the collate<charT> facet.
3 効果: collate<charT> ファセットに従ってふたつの文字列を比較する。
4 Remarks: This member operator template (and therefore locale itself) satisfies requirements for a comparator predicate template argument (Clause 25) applied to strings.
4 備考: このメンバー演算子テンプレート ( 従って locale そのもの ) は文字列に適用される比較述語テンプレート引数 ( 25 条 ) の必要条件を満たす。
5 Returns: The result of the following expression:
5 返り値: 以下の式の結果。
use_facet< collate<charT> >(*this).compare
(s1.data(), s1.data()+s1.size(), s2.data(), s2.data()+s2.size()) < 0;
6 [ Example: A vector of strings v can be collated according to collation rules in locale loc simply by (25.4.1, 23.3.6):
std::sort(v.begin(), v.end(), loc);
-end example ]
6 [ 例: ( 25.4.1, 23.3.6 ) により文字列 vector v はロカール loc における比較規則に従って簡単に比較可能である。:
std::sort(v.begin(), v.end(), loc);
]