tmp/tmpaxeh3wth/{from.md → to.md}
RENAMED
|
@@ -2,52 +2,52 @@
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr basic_string& erase(size_type pos = 0, size_type n = npos);
|
| 5 |
```
|
| 6 |
|
| 7 |
-
*Throws:* `out_of_range` if `pos` `> size()`.
|
| 8 |
-
|
| 9 |
*Effects:* Determines the effective length `xlen` of the string to be
|
| 10 |
removed as the smaller of `n` and `size() - pos`. Removes the characters
|
| 11 |
in the range \[`begin() + pos`, `begin() + pos + xlen`).
|
| 12 |
|
| 13 |
*Returns:* `*this`.
|
| 14 |
|
|
|
|
|
|
|
| 15 |
``` cpp
|
| 16 |
constexpr iterator erase(const_iterator p);
|
| 17 |
```
|
| 18 |
|
| 19 |
*Preconditions:* `p` is a valid dereferenceable iterator on `*this`.
|
| 20 |
|
| 21 |
-
*Throws:* Nothing.
|
| 22 |
-
|
| 23 |
*Effects:* Removes the character referred to by `p`.
|
| 24 |
|
| 25 |
*Returns:* An iterator which points to the element immediately following
|
| 26 |
`p` prior to the element being erased. If no such element exists,
|
| 27 |
`end()` is returned.
|
| 28 |
|
|
|
|
|
|
|
| 29 |
``` cpp
|
| 30 |
constexpr iterator erase(const_iterator first, const_iterator last);
|
| 31 |
```
|
| 32 |
|
| 33 |
*Preconditions:* `first` and `last` are valid iterators on `*this`.
|
| 34 |
\[`first`, `last`) is a valid range.
|
| 35 |
|
| 36 |
-
*Throws:* Nothing.
|
| 37 |
-
|
| 38 |
*Effects:* Removes the characters in the range `[first, last)`.
|
| 39 |
|
| 40 |
*Returns:* An iterator which points to the element pointed to by `last`
|
| 41 |
prior to the other elements being erased. If no such element exists,
|
| 42 |
`end()` is returned.
|
| 43 |
|
|
|
|
|
|
|
| 44 |
``` cpp
|
| 45 |
constexpr void pop_back();
|
| 46 |
```
|
| 47 |
|
| 48 |
*Preconditions:* `!empty()`.
|
| 49 |
|
| 50 |
-
*Throws:* Nothing.
|
| 51 |
-
|
| 52 |
*Effects:* Equivalent to `erase(end() - 1)`.
|
| 53 |
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
constexpr basic_string& erase(size_type pos = 0, size_type n = npos);
|
| 5 |
```
|
| 6 |
|
|
|
|
|
|
|
| 7 |
*Effects:* Determines the effective length `xlen` of the string to be
|
| 8 |
removed as the smaller of `n` and `size() - pos`. Removes the characters
|
| 9 |
in the range \[`begin() + pos`, `begin() + pos + xlen`).
|
| 10 |
|
| 11 |
*Returns:* `*this`.
|
| 12 |
|
| 13 |
+
*Throws:* `out_of_range` if `pos` `> size()`.
|
| 14 |
+
|
| 15 |
``` cpp
|
| 16 |
constexpr iterator erase(const_iterator p);
|
| 17 |
```
|
| 18 |
|
| 19 |
*Preconditions:* `p` is a valid dereferenceable iterator on `*this`.
|
| 20 |
|
|
|
|
|
|
|
| 21 |
*Effects:* Removes the character referred to by `p`.
|
| 22 |
|
| 23 |
*Returns:* An iterator which points to the element immediately following
|
| 24 |
`p` prior to the element being erased. If no such element exists,
|
| 25 |
`end()` is returned.
|
| 26 |
|
| 27 |
+
*Throws:* Nothing.
|
| 28 |
+
|
| 29 |
``` cpp
|
| 30 |
constexpr iterator erase(const_iterator first, const_iterator last);
|
| 31 |
```
|
| 32 |
|
| 33 |
*Preconditions:* `first` and `last` are valid iterators on `*this`.
|
| 34 |
\[`first`, `last`) is a valid range.
|
| 35 |
|
|
|
|
|
|
|
| 36 |
*Effects:* Removes the characters in the range `[first, last)`.
|
| 37 |
|
| 38 |
*Returns:* An iterator which points to the element pointed to by `last`
|
| 39 |
prior to the other elements being erased. If no such element exists,
|
| 40 |
`end()` is returned.
|
| 41 |
|
| 42 |
+
*Throws:* Nothing.
|
| 43 |
+
|
| 44 |
``` cpp
|
| 45 |
constexpr void pop_back();
|
| 46 |
```
|
| 47 |
|
| 48 |
*Preconditions:* `!empty()`.
|
| 49 |
|
|
|
|
|
|
|
| 50 |
*Effects:* Equivalent to `erase(end() - 1)`.
|
| 51 |
|
| 52 |
+
*Throws:* Nothing.
|
| 53 |
+
|