- tmp/tmplzmzgokc/{from.md → to.md} +165 -14
tmp/tmplzmzgokc/{from.md → to.md}
RENAMED
|
@@ -15,23 +15,174 @@ of these members.
|
|
| 15 |
|
| 16 |
To specialize class template `basic_regex` for a character container
|
| 17 |
`CharT` and its related regular expression traits class `Traits`, use
|
| 18 |
`basic_regex<CharT, Traits>`.
|
| 19 |
|
| 20 |
-
In
|
| 21 |
-
|
| 22 |
-
`
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
regular expression traits class when it is specialized for `char` or
|
| 35 |
`wchar_t`. This class template is described in the header `<regex>`, and
|
| 36 |
is described in [[re.traits]]. — *end note*]
|
| 37 |
|
|
|
|
| 15 |
|
| 16 |
To specialize class template `basic_regex` for a character container
|
| 17 |
`CharT` and its related regular expression traits class `Traits`, use
|
| 18 |
`basic_regex<CharT, Traits>`.
|
| 19 |
|
| 20 |
+
In the following requirements,
|
| 21 |
+
|
| 22 |
+
- `X` denotes a traits class defining types and functions for the
|
| 23 |
+
character container type `charT`;
|
| 24 |
+
- `u` is an object of type `X`;
|
| 25 |
+
- `v` is an object of type `const X`;
|
| 26 |
+
- `p` is a value of type `const charT*`;
|
| 27 |
+
- `I1` and `I2` are input iterators [[input.iterators]];
|
| 28 |
+
- `F1` and `F2` are forward iterators [[forward.iterators]];
|
| 29 |
+
- `c` is a value of type `const charT`;
|
| 30 |
+
- `s` is an object of type `X::string_type`;
|
| 31 |
+
- `cs` is an object of type `const X::string_type`;
|
| 32 |
+
- `b` is a value of type `bool`;
|
| 33 |
+
- `I` is a value of type `int`;
|
| 34 |
+
- `cl` is an object of type `X::char_class_type`; and
|
| 35 |
+
- `loc` is an object of type `X::locale_type`.
|
| 36 |
+
|
| 37 |
+
A traits class `X` meets the regular expression traits requirements if
|
| 38 |
+
the following types and expressions are well-formed and have the
|
| 39 |
+
specified semantics.
|
| 40 |
+
|
| 41 |
+
``` cpp
|
| 42 |
+
typename X::char_type
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
*Result:* `charT`, the character container type used in the
|
| 46 |
+
implementation of class template `basic_regex`.
|
| 47 |
+
|
| 48 |
+
``` cpp
|
| 49 |
+
typename X::string_type
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
*Result:* `basic_string<charT>`
|
| 53 |
+
|
| 54 |
+
``` cpp
|
| 55 |
+
typename X::locale_type
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
*Result:* A copy constructible type that represents the locale used by
|
| 59 |
+
the traits class.
|
| 60 |
+
|
| 61 |
+
``` cpp
|
| 62 |
+
typename X::char_class_type
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
*Result:* A bitmask type [[bitmask.types]] representing a particular
|
| 66 |
+
character classification.
|
| 67 |
+
|
| 68 |
+
``` cpp
|
| 69 |
+
X::length(p)
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
*Result:* `size_t`
|
| 73 |
+
|
| 74 |
+
*Returns:* The smallest `i` such that `p[i] == 0`.
|
| 75 |
+
|
| 76 |
+
*Complexity:* Linear in `i`.
|
| 77 |
+
|
| 78 |
+
``` cpp
|
| 79 |
+
v.translate(c)
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
*Result:* `X::char_type`
|
| 83 |
+
|
| 84 |
+
*Returns:* A character such that for any character `d` that is to be
|
| 85 |
+
considered equivalent to `c` then `v.translate(c) == v.translate(d)`.
|
| 86 |
+
|
| 87 |
+
``` cpp
|
| 88 |
+
v.translate_nocase(c)
|
| 89 |
+
```
|
| 90 |
+
|
| 91 |
+
*Result:* `X::char_type`
|
| 92 |
+
|
| 93 |
+
*Returns:* For all characters `C` that are to be considered equivalent
|
| 94 |
+
to `c` when comparisons are to be performed without regard to case, then
|
| 95 |
+
`v.translate_nocase(c) == v.translate_nocase(C)`.
|
| 96 |
+
|
| 97 |
+
``` cpp
|
| 98 |
+
v.transform(F1, F2)
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
*Result:* `X::string_type`
|
| 102 |
+
|
| 103 |
+
*Returns:* A sort key for the character sequence designated by the
|
| 104 |
+
iterator range \[`F1`, `F2`) such that if the character sequence \[`G1`,
|
| 105 |
+
`G2`) sorts before the character sequence \[`H1`, `H2`) then
|
| 106 |
+
`v.transform(G1, G2) < v.transform(H1, H2)`.
|
| 107 |
+
|
| 108 |
+
``` cpp
|
| 109 |
+
v.transform_primary(F1, F2)
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
*Result:* `X::string_type`
|
| 113 |
+
|
| 114 |
+
*Returns:* A sort key for the character sequence designated by the
|
| 115 |
+
iterator range \[`F1`, `F2`) such that if the character sequence \[`G1`,
|
| 116 |
+
`G2`) sorts before the character sequence \[`H1`, `H2`) when character
|
| 117 |
+
case is not considered then
|
| 118 |
+
`v.transform_primary(G1, G2) < v.transform_primary(H1, H2)`.
|
| 119 |
+
|
| 120 |
+
``` cpp
|
| 121 |
+
v.lookup_collatename(F1, F2)
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
*Result:* `X::string_type`
|
| 125 |
+
|
| 126 |
+
*Returns:* A sequence of characters that represents the collating
|
| 127 |
+
element consisting of the character sequence designated by the iterator
|
| 128 |
+
range \[`F1`, `F2`). Returns an empty string if the character sequence
|
| 129 |
+
is not a valid collating element.
|
| 130 |
+
|
| 131 |
+
``` cpp
|
| 132 |
+
v.lookup_classname(F1, F2, b)
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
*Result:* `X::char_class_type`
|
| 136 |
+
|
| 137 |
+
*Returns:* Converts the character sequence designated by the iterator
|
| 138 |
+
range \[`F1`, `F2`) into a value of a bitmask type that can subsequently
|
| 139 |
+
be passed to `isctype`. Values returned from `lookup_classname` can be
|
| 140 |
+
bitwise ’ed together; the resulting value represents membership in
|
| 141 |
+
either of the corresponding character classes. If `b` is `true`, the
|
| 142 |
+
returned bitmask is suitable for matching characters without regard to
|
| 143 |
+
their case. Returns `0` if the character sequence is not the name of a
|
| 144 |
+
character class recognized by `X`. The value returned shall be
|
| 145 |
+
independent of the case of the characters in the sequence.
|
| 146 |
+
|
| 147 |
+
``` cpp
|
| 148 |
+
v.isctype(c, cl)
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
*Result:* `bool`
|
| 152 |
+
|
| 153 |
+
*Returns:* Returns `true` if character `c` is a member of one of the
|
| 154 |
+
character classes designated by `cl`, `false` otherwise.
|
| 155 |
+
|
| 156 |
+
``` cpp
|
| 157 |
+
v.value(c, I)
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
*Result:* `int`
|
| 161 |
+
|
| 162 |
+
*Returns:* Returns the value represented by the digit *c* in base *I* if
|
| 163 |
+
the character *c* is a valid digit in base *I*; otherwise returns `-1`.
|
| 164 |
+
|
| 165 |
+
[*Note 1*: The value of *I* will only be 8, 10, or 16. — *end note*]
|
| 166 |
+
|
| 167 |
+
``` cpp
|
| 168 |
+
u.imbue(loc)
|
| 169 |
+
```
|
| 170 |
+
|
| 171 |
+
*Result:* `X::locale_type`
|
| 172 |
+
|
| 173 |
+
*Effects:* Imbues `u` with the locale `loc` and returns the previous
|
| 174 |
+
locale used by `u` if any.
|
| 175 |
+
|
| 176 |
+
``` cpp
|
| 177 |
+
v.getloc()
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
*Result:* `X::locale_type`
|
| 181 |
+
|
| 182 |
+
*Returns:* Returns the current locale used by `v`, if any.
|
| 183 |
+
|
| 184 |
+
[*Note 2*: Class template `regex_traits` meets the requirements for a
|
| 185 |
regular expression traits class when it is specialized for `char` or
|
| 186 |
`wchar_t`. This class template is described in the header `<regex>`, and
|
| 187 |
is described in [[re.traits]]. — *end note*]
|
| 188 |
|