tmp/tmpc6b6nikb/{from.md → to.md}
RENAMED
|
@@ -6,42 +6,44 @@ iterator insert(const_iterator position, T&& x);
|
|
| 6 |
iterator insert(const_iterator position, size_type n, const T& x);
|
| 7 |
template <class InputIterator>
|
| 8 |
iterator insert(const_iterator position, InputIterator first, InputIterator last);
|
| 9 |
iterator insert(const_iterator position, initializer_list<T>);
|
| 10 |
|
| 11 |
-
template <class... Args>
|
| 12 |
template <class... Args> iterator emplace(const_iterator position, Args&&... args);
|
| 13 |
void push_back(const T& x);
|
| 14 |
void push_back(T&& x);
|
| 15 |
```
|
| 16 |
|
| 17 |
*Remarks:* Causes reallocation if the new size is greater than the old
|
| 18 |
-
capacity.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
|
| 28 |
*Complexity:* The complexity is linear in the number of elements
|
| 29 |
inserted plus the distance to the end of the vector.
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
iterator erase(const_iterator position);
|
| 33 |
iterator erase(const_iterator first, const_iterator last);
|
|
|
|
| 34 |
```
|
| 35 |
|
| 36 |
*Effects:* Invalidates iterators and references at or after the point of
|
| 37 |
the erase.
|
| 38 |
|
| 39 |
*Complexity:* The destructor of `T` is called the number of times equal
|
| 40 |
-
to the number of the elements erased, but the
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
*Throws:* Nothing unless an exception is thrown by the
|
| 45 |
-
|
| 46 |
-
`T`.
|
| 47 |
|
|
|
|
| 6 |
iterator insert(const_iterator position, size_type n, const T& x);
|
| 7 |
template <class InputIterator>
|
| 8 |
iterator insert(const_iterator position, InputIterator first, InputIterator last);
|
| 9 |
iterator insert(const_iterator position, initializer_list<T>);
|
| 10 |
|
| 11 |
+
template <class... Args> reference emplace_back(Args&&... args);
|
| 12 |
template <class... Args> iterator emplace(const_iterator position, Args&&... args);
|
| 13 |
void push_back(const T& x);
|
| 14 |
void push_back(T&& x);
|
| 15 |
```
|
| 16 |
|
| 17 |
*Remarks:* Causes reallocation if the new size is greater than the old
|
| 18 |
+
capacity. Reallocation invalidates all the references, pointers, and
|
| 19 |
+
iterators referring to the elements in the sequence. If no reallocation
|
| 20 |
+
happens, all the iterators and references before the insertion point
|
| 21 |
+
remain valid. If an exception is thrown other than by the copy
|
| 22 |
+
constructor, move constructor, assignment operator, or move assignment
|
| 23 |
+
operator of `T` or by any `InputIterator` operation there are no
|
| 24 |
+
effects. If an exception is thrown while inserting a single element at
|
| 25 |
+
the end and `T` is `CopyInsertable` or
|
| 26 |
+
`is_nothrow_move_constructible_v<T>` is `true`, there are no effects.
|
| 27 |
+
Otherwise, if an exception is thrown by the move constructor of a
|
| 28 |
+
non-`CopyInsertable` `T`, the effects are unspecified.
|
| 29 |
|
| 30 |
*Complexity:* The complexity is linear in the number of elements
|
| 31 |
inserted plus the distance to the end of the vector.
|
| 32 |
|
| 33 |
``` cpp
|
| 34 |
iterator erase(const_iterator position);
|
| 35 |
iterator erase(const_iterator first, const_iterator last);
|
| 36 |
+
void pop_back();
|
| 37 |
```
|
| 38 |
|
| 39 |
*Effects:* Invalidates iterators and references at or after the point of
|
| 40 |
the erase.
|
| 41 |
|
| 42 |
*Complexity:* The destructor of `T` is called the number of times equal
|
| 43 |
+
to the number of the elements erased, but the assignment operator of `T`
|
| 44 |
+
is called the number of times equal to the number of elements in the
|
| 45 |
+
vector after the erased elements.
|
| 46 |
|
| 47 |
+
*Throws:* Nothing unless an exception is thrown by the assignment
|
| 48 |
+
operator or move assignment operator of `T`.
|
|
|
|
| 49 |
|