tmp/tmpjw5pleqm/{from.md → to.md}
RENAMED
|
@@ -140,10 +140,74 @@ template<class charT, class traits, class Allocator>
|
|
| 140 |
``` cpp
|
| 141 |
lhs.push_back(rhs);
|
| 142 |
return std::move(lhs);
|
| 143 |
```
|
| 144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
#### Non-member comparison operator functions <a id="string.cmp">[[string.cmp]]</a>
|
| 146 |
|
| 147 |
``` cpp
|
| 148 |
template<class charT, class traits, class Allocator>
|
| 149 |
constexpr bool
|
|
@@ -268,11 +332,11 @@ template<class charT, class traits, class Allocator>
|
|
| 268 |
*Returns:* `getline(is, str, is.widen(’\n’))`.
|
| 269 |
|
| 270 |
#### Erasure <a id="string.erasure">[[string.erasure]]</a>
|
| 271 |
|
| 272 |
``` cpp
|
| 273 |
-
template<class charT, class traits, class Allocator, class U>
|
| 274 |
constexpr typename basic_string<charT, traits, Allocator>::size_type
|
| 275 |
erase(basic_string<charT, traits, Allocator>& c, const U& value);
|
| 276 |
```
|
| 277 |
|
| 278 |
*Effects:* Equivalent to:
|
|
|
|
| 140 |
``` cpp
|
| 141 |
lhs.push_back(rhs);
|
| 142 |
return std::move(lhs);
|
| 143 |
```
|
| 144 |
|
| 145 |
+
``` cpp
|
| 146 |
+
template<class charT, class traits, class Allocator>
|
| 147 |
+
constexpr basic_string<charT, traits, Allocator>
|
| 148 |
+
operator+(const basic_string<charT, traits, Allocator>& lhs,
|
| 149 |
+
type_identity_t<basic_string_view<charT, traits>> rhs);
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
Equivalent to:
|
| 153 |
+
|
| 154 |
+
``` cpp
|
| 155 |
+
basic_string<charT, traits, Allocator> r = lhs;
|
| 156 |
+
r.append(rhs);
|
| 157 |
+
return r;
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
``` cpp
|
| 161 |
+
template<class charT, class traits, class Allocator>
|
| 162 |
+
constexpr basic_string<charT, traits, Allocator>
|
| 163 |
+
operator+(basic_string<charT, traits, Allocator>&& lhs,
|
| 164 |
+
type_identity_t<basic_string_view<charT, traits>> rhs);
|
| 165 |
+
```
|
| 166 |
+
|
| 167 |
+
Equivalent to:
|
| 168 |
+
|
| 169 |
+
``` cpp
|
| 170 |
+
lhs.append(rhs);
|
| 171 |
+
return std::move(lhs);
|
| 172 |
+
```
|
| 173 |
+
|
| 174 |
+
``` cpp
|
| 175 |
+
template<class charT, class traits, class Allocator>
|
| 176 |
+
constexpr basic_string<charT, traits, Allocator>
|
| 177 |
+
operator+(type_identity_t<basic_string_view<charT, traits>> lhs,
|
| 178 |
+
const basic_string<charT, traits, Allocator>& rhs);
|
| 179 |
+
```
|
| 180 |
+
|
| 181 |
+
Equivalent to:
|
| 182 |
+
|
| 183 |
+
``` cpp
|
| 184 |
+
basic_string<charT, traits, Allocator> r = rhs;
|
| 185 |
+
r.insert(0, lhs);
|
| 186 |
+
return r;
|
| 187 |
+
```
|
| 188 |
+
|
| 189 |
+
``` cpp
|
| 190 |
+
template<class charT, class traits, class Allocator>
|
| 191 |
+
constexpr basic_string<charT, traits, Allocator>
|
| 192 |
+
operator+(type_identity_t<basic_string_view<charT, traits>> lhs,
|
| 193 |
+
basic_string<charT, traits, Allocator>&& rhs);
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
Equivalent to:
|
| 197 |
+
|
| 198 |
+
``` cpp
|
| 199 |
+
rhs.insert(0, lhs);
|
| 200 |
+
return std::move(rhs);
|
| 201 |
+
```
|
| 202 |
+
|
| 203 |
+
[*Note 1*: Using a specialization of `type_identity_t` as a parameter
|
| 204 |
+
type ensures that an object of type
|
| 205 |
+
`basic_string<charT, traits, Allocator>` can be concatenated with an
|
| 206 |
+
object of a type `T` having an implicit conversion to
|
| 207 |
+
`basic_string_view<charT, traits>` [[over.match.oper]]. — *end note*]
|
| 208 |
+
|
| 209 |
#### Non-member comparison operator functions <a id="string.cmp">[[string.cmp]]</a>
|
| 210 |
|
| 211 |
``` cpp
|
| 212 |
template<class charT, class traits, class Allocator>
|
| 213 |
constexpr bool
|
|
|
|
| 332 |
*Returns:* `getline(is, str, is.widen(’\n’))`.
|
| 333 |
|
| 334 |
#### Erasure <a id="string.erasure">[[string.erasure]]</a>
|
| 335 |
|
| 336 |
``` cpp
|
| 337 |
+
template<class charT, class traits, class Allocator, class U = charT>
|
| 338 |
constexpr typename basic_string<charT, traits, Allocator>::size_type
|
| 339 |
erase(basic_string<charT, traits, Allocator>& c, const U& value);
|
| 340 |
```
|
| 341 |
|
| 342 |
*Effects:* Equivalent to:
|