tmp/tmp5xu90hpi/{from.md → to.md}
RENAMED
|
@@ -126,11 +126,11 @@ constexpr basic_string& append(size_type n, charT c);
|
|
| 126 |
template<class InputIterator>
|
| 127 |
constexpr basic_string& append(InputIterator first, InputIterator last);
|
| 128 |
```
|
| 129 |
|
| 130 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 131 |
-
iterator [[container.
|
| 132 |
|
| 133 |
*Effects:* Equivalent to:
|
| 134 |
`return append(basic_string(first, last, get_allocator()));`
|
| 135 |
|
| 136 |
``` cpp
|
|
@@ -254,11 +254,11 @@ return *this;
|
|
| 254 |
template<class InputIterator>
|
| 255 |
constexpr basic_string& assign(InputIterator first, InputIterator last);
|
| 256 |
```
|
| 257 |
|
| 258 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 259 |
-
iterator [[container.
|
| 260 |
|
| 261 |
*Effects:* Equivalent to:
|
| 262 |
`return assign(basic_string(first, last, get_allocator()));`
|
| 263 |
|
| 264 |
``` cpp
|
|
@@ -354,11 +354,11 @@ constexpr basic_string& insert(size_type pos, size_type n, charT c);
|
|
| 354 |
```
|
| 355 |
|
| 356 |
*Effects:* Inserts `n` copies of `c` before the character at position
|
| 357 |
`pos` if `pos < size()`, or otherwise at the end of the string.
|
| 358 |
|
| 359 |
-
*Returns:* `*this`
|
| 360 |
|
| 361 |
*Throws:*
|
| 362 |
|
| 363 |
- `out_of_range` if `pos > size()`,
|
| 364 |
- `length_error` if `n > max_size() - size()`, or
|
|
@@ -389,11 +389,11 @@ constexpr iterator insert(const_iterator p, size_type n, charT c);
|
|
| 389 |
template<class InputIterator>
|
| 390 |
constexpr iterator insert(const_iterator p, InputIterator first, InputIterator last);
|
| 391 |
```
|
| 392 |
|
| 393 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 394 |
-
iterator [[container.
|
| 395 |
|
| 396 |
*Preconditions:* `p` is a valid iterator on `*this`.
|
| 397 |
|
| 398 |
*Effects:* Equivalent to
|
| 399 |
`insert(p - begin(), basic_string(first, last, get_allocator()))`.
|
|
@@ -453,11 +453,11 @@ constexpr iterator erase(const_iterator first, const_iterator last);
|
|
| 453 |
```
|
| 454 |
|
| 455 |
*Preconditions:* `first` and `last` are valid iterators on `*this`.
|
| 456 |
\[`first`, `last`) is a valid range.
|
| 457 |
|
| 458 |
-
*Effects:* Removes the characters in the range
|
| 459 |
|
| 460 |
*Returns:* An iterator which points to the element pointed to by `last`
|
| 461 |
prior to the other elements being erased. If no such element exists,
|
| 462 |
`end()` is returned.
|
| 463 |
|
|
@@ -465,11 +465,11 @@ prior to the other elements being erased. If no such element exists,
|
|
| 465 |
|
| 466 |
``` cpp
|
| 467 |
constexpr void pop_back();
|
| 468 |
```
|
| 469 |
|
| 470 |
-
|
| 471 |
|
| 472 |
*Effects:* Equivalent to `erase(end() - 1)`.
|
| 473 |
|
| 474 |
*Throws:* Nothing.
|
| 475 |
|
|
@@ -571,12 +571,12 @@ the function replaces the characters in the range \[`begin() + pos1`,
|
|
| 571 |
*Returns:* `*this`.
|
| 572 |
|
| 573 |
*Throws:*
|
| 574 |
|
| 575 |
- `out_of_range` if `pos1 > size()`,
|
| 576 |
-
- `length_error` if the length of the resulting string would
|
| 577 |
-
|
| 578 |
- any exceptions thrown by `allocator_traits<Allocator>::allocate.`
|
| 579 |
|
| 580 |
``` cpp
|
| 581 |
constexpr basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str);
|
| 582 |
```
|
|
@@ -631,11 +631,11 @@ template<class InputIterator>
|
|
| 631 |
constexpr basic_string& replace(const_iterator i1, const_iterator i2,
|
| 632 |
InputIterator j1, InputIterator j2);
|
| 633 |
```
|
| 634 |
|
| 635 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 636 |
-
iterator [[container.
|
| 637 |
|
| 638 |
*Effects:* Equivalent to:
|
| 639 |
`return replace(i1, i2, basic_string(j1, j2, get_allocator()));`
|
| 640 |
|
| 641 |
``` cpp
|
|
|
|
| 126 |
template<class InputIterator>
|
| 127 |
constexpr basic_string& append(InputIterator first, InputIterator last);
|
| 128 |
```
|
| 129 |
|
| 130 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 131 |
+
iterator [[container.reqmts]].
|
| 132 |
|
| 133 |
*Effects:* Equivalent to:
|
| 134 |
`return append(basic_string(first, last, get_allocator()));`
|
| 135 |
|
| 136 |
``` cpp
|
|
|
|
| 254 |
template<class InputIterator>
|
| 255 |
constexpr basic_string& assign(InputIterator first, InputIterator last);
|
| 256 |
```
|
| 257 |
|
| 258 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 259 |
+
iterator [[container.reqmts]].
|
| 260 |
|
| 261 |
*Effects:* Equivalent to:
|
| 262 |
`return assign(basic_string(first, last, get_allocator()));`
|
| 263 |
|
| 264 |
``` cpp
|
|
|
|
| 354 |
```
|
| 355 |
|
| 356 |
*Effects:* Inserts `n` copies of `c` before the character at position
|
| 357 |
`pos` if `pos < size()`, or otherwise at the end of the string.
|
| 358 |
|
| 359 |
+
*Returns:* `*this`.
|
| 360 |
|
| 361 |
*Throws:*
|
| 362 |
|
| 363 |
- `out_of_range` if `pos > size()`,
|
| 364 |
- `length_error` if `n > max_size() - size()`, or
|
|
|
|
| 389 |
template<class InputIterator>
|
| 390 |
constexpr iterator insert(const_iterator p, InputIterator first, InputIterator last);
|
| 391 |
```
|
| 392 |
|
| 393 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 394 |
+
iterator [[container.reqmts]].
|
| 395 |
|
| 396 |
*Preconditions:* `p` is a valid iterator on `*this`.
|
| 397 |
|
| 398 |
*Effects:* Equivalent to
|
| 399 |
`insert(p - begin(), basic_string(first, last, get_allocator()))`.
|
|
|
|
| 453 |
```
|
| 454 |
|
| 455 |
*Preconditions:* `first` and `last` are valid iterators on `*this`.
|
| 456 |
\[`first`, `last`) is a valid range.
|
| 457 |
|
| 458 |
+
*Effects:* Removes the characters in the range \[`first`, `last`).
|
| 459 |
|
| 460 |
*Returns:* An iterator which points to the element pointed to by `last`
|
| 461 |
prior to the other elements being erased. If no such element exists,
|
| 462 |
`end()` is returned.
|
| 463 |
|
|
|
|
| 465 |
|
| 466 |
``` cpp
|
| 467 |
constexpr void pop_back();
|
| 468 |
```
|
| 469 |
|
| 470 |
+
`empty()` is `false`.
|
| 471 |
|
| 472 |
*Effects:* Equivalent to `erase(end() - 1)`.
|
| 473 |
|
| 474 |
*Throws:* Nothing.
|
| 475 |
|
|
|
|
| 571 |
*Returns:* `*this`.
|
| 572 |
|
| 573 |
*Throws:*
|
| 574 |
|
| 575 |
- `out_of_range` if `pos1 > size()`,
|
| 576 |
+
- `length_error` if the length of the resulting string would exceed
|
| 577 |
+
`max_size()`, or
|
| 578 |
- any exceptions thrown by `allocator_traits<Allocator>::allocate.`
|
| 579 |
|
| 580 |
``` cpp
|
| 581 |
constexpr basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str);
|
| 582 |
```
|
|
|
|
| 631 |
constexpr basic_string& replace(const_iterator i1, const_iterator i2,
|
| 632 |
InputIterator j1, InputIterator j2);
|
| 633 |
```
|
| 634 |
|
| 635 |
*Constraints:* `InputIterator` is a type that qualifies as an input
|
| 636 |
+
iterator [[container.reqmts]].
|
| 637 |
|
| 638 |
*Effects:* Equivalent to:
|
| 639 |
`return replace(i1, i2, basic_string(j1, j2, get_allocator()));`
|
| 640 |
|
| 641 |
``` cpp
|