From Jason Turner

[category.collate]

Diff to HTML by rtfpessoa

tmp/tmpff6qao41/{from.md → to.md} RENAMED
@@ -1,9 +1,11 @@
1
  ### The collate category <a id="category.collate">[[category.collate]]</a>
2
 
3
  #### Class template `collate` <a id="locale.collate">[[locale.collate]]</a>
4
 
 
 
5
  ``` cpp
6
  namespace std {
7
  template<class charT>
8
  class collate : public locale::facet {
9
  public:
@@ -33,11 +35,11 @@ The class `collate<charT>` provides features for use in the collation
33
  (comparison) and hashing of strings. A locale member function template,
34
  `operator()`, uses the collate facet to allow a locale to act directly
35
  as the predicate argument for standard algorithms [[algorithms]] and
36
  containers operating on strings. The specializations required in
37
  [[locale.category.facets]] [[locale.category]], namely `collate<char>`
38
- and `collate<wchar_t>`, apply lexicographic ordering
39
  [[alg.lex.comparison]].
40
 
41
  Each function compares a string of characters `*p` in the range \[`low`,
42
  `high`).
43
 
@@ -90,13 +92,13 @@ long do_hash(const charT* low, const charT* high) const;
90
 
91
  *Returns:* An integer value equal to the result of calling `hash()` on
92
  any other string for which `do_compare()` returns 0 (equal) when passed
93
  the two strings.
94
 
95
- [*Note 1*: The probability that the result equals that for another
96
- string which does not compare equal should be very small, approaching
97
- `(1.0/numeric_limits<unsigned long>::max())`. — *end note*]
98
 
99
  #### Class template `collate_byname` <a id="locale.collate.byname">[[locale.collate.byname]]</a>
100
 
101
  ``` cpp
102
  namespace std {
 
1
  ### The collate category <a id="category.collate">[[category.collate]]</a>
2
 
3
  #### Class template `collate` <a id="locale.collate">[[locale.collate]]</a>
4
 
5
+ ##### General <a id="locale.collate.general">[[locale.collate.general]]</a>
6
+
7
  ``` cpp
8
  namespace std {
9
  template<class charT>
10
  class collate : public locale::facet {
11
  public:
 
35
  (comparison) and hashing of strings. A locale member function template,
36
  `operator()`, uses the collate facet to allow a locale to act directly
37
  as the predicate argument for standard algorithms [[algorithms]] and
38
  containers operating on strings. The specializations required in
39
  [[locale.category.facets]] [[locale.category]], namely `collate<char>`
40
+ and `collate<wchar_t>`, apply lexicographical ordering
41
  [[alg.lex.comparison]].
42
 
43
  Each function compares a string of characters `*p` in the range \[`low`,
44
  `high`).
45
 
 
92
 
93
  *Returns:* An integer value equal to the result of calling `hash()` on
94
  any other string for which `do_compare()` returns 0 (equal) when passed
95
  the two strings.
96
 
97
+ *Recommended practice:* The probability that the result equals that for
98
+ another string which does not compare equal should be very small,
99
+ approaching `(1.0/numeric_limits<unsigned long>::max())`.
100
 
101
  #### Class template `collate_byname` <a id="locale.collate.byname">[[locale.collate.byname]]</a>
102
 
103
  ``` cpp
104
  namespace std {