tmp/tmp9a8irzhj/{from.md → to.md}
RENAMED
|
@@ -5,39 +5,45 @@ iterator insert(const_iterator position, const T& x);
|
|
| 5 |
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,
|
| 9 |
InputIterator first, InputIterator last);
|
|
|
|
|
|
|
| 10 |
iterator insert(const_iterator position, initializer_list<T>);
|
| 11 |
|
| 12 |
template<class... Args> reference emplace_front(Args&&... args);
|
| 13 |
template<class... Args> reference emplace_back(Args&&... args);
|
| 14 |
template<class... Args> iterator emplace(const_iterator position, Args&&... args);
|
| 15 |
void push_front(const T& x);
|
| 16 |
void push_front(T&& x);
|
|
|
|
|
|
|
| 17 |
void push_back(const T& x);
|
| 18 |
void push_back(T&& x);
|
|
|
|
|
|
|
| 19 |
```
|
| 20 |
|
| 21 |
*Effects:* An insertion in the middle of the deque invalidates all the
|
| 22 |
iterators and references to elements of the deque. An insertion at
|
| 23 |
either end of the deque invalidates all the iterators to the deque, but
|
| 24 |
has no effect on the validity of references to elements of the deque.
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
*Remarks:* If an exception is thrown other than by the copy constructor,
|
| 27 |
move constructor, assignment operator, or move assignment operator of
|
| 28 |
`T` there are no effects. If an exception is thrown while inserting a
|
| 29 |
single element at either end, there are no effects. Otherwise, if an
|
| 30 |
exception is thrown by the move constructor of a
|
| 31 |
non-*Cpp17CopyInsertable* `T`, the effects are unspecified.
|
| 32 |
|
| 33 |
-
*Complexity:* The complexity is linear in the number of elements
|
| 34 |
-
inserted plus the lesser of the distances to the beginning and end of
|
| 35 |
-
the deque. Inserting a single element at either the beginning or end of
|
| 36 |
-
a deque always takes constant time and causes a single call to a
|
| 37 |
-
constructor of `T`.
|
| 38 |
-
|
| 39 |
``` cpp
|
| 40 |
iterator erase(const_iterator position);
|
| 41 |
iterator erase(const_iterator first, const_iterator last);
|
| 42 |
void pop_front();
|
| 43 |
void pop_back();
|
|
@@ -53,14 +59,14 @@ invalidates the past-the-end iterator and all iterators and references
|
|
| 53 |
to all the elements of the deque.
|
| 54 |
|
| 55 |
[*Note 1*: `pop_front` and `pop_back` are erase
|
| 56 |
operations. — *end note*]
|
| 57 |
|
|
|
|
|
|
|
|
|
|
| 58 |
*Complexity:* The number of calls to the destructor of `T` is the same
|
| 59 |
as the number of elements erased, but the number of calls to the
|
| 60 |
assignment operator of `T` is no more than the lesser of the number of
|
| 61 |
elements before the erased elements and the number of elements after the
|
| 62 |
erased elements.
|
| 63 |
|
| 64 |
-
*Throws:* Nothing unless an exception is thrown by the assignment
|
| 65 |
-
operator of `T`.
|
| 66 |
-
|
|
|
|
| 5 |
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,
|
| 9 |
InputIterator first, InputIterator last);
|
| 10 |
+
template<container-compatible-range<T> R>
|
| 11 |
+
iterator insert_range(const_iterator position, R&& rg);
|
| 12 |
iterator insert(const_iterator position, initializer_list<T>);
|
| 13 |
|
| 14 |
template<class... Args> reference emplace_front(Args&&... args);
|
| 15 |
template<class... Args> reference emplace_back(Args&&... args);
|
| 16 |
template<class... Args> iterator emplace(const_iterator position, Args&&... args);
|
| 17 |
void push_front(const T& x);
|
| 18 |
void push_front(T&& x);
|
| 19 |
+
template<container-compatible-range<T> R>
|
| 20 |
+
void prepend_range(R&& rg);
|
| 21 |
void push_back(const T& x);
|
| 22 |
void push_back(T&& x);
|
| 23 |
+
template<container-compatible-range<T> R>
|
| 24 |
+
void append_range(R&& rg);
|
| 25 |
```
|
| 26 |
|
| 27 |
*Effects:* An insertion in the middle of the deque invalidates all the
|
| 28 |
iterators and references to elements of the deque. An insertion at
|
| 29 |
either end of the deque invalidates all the iterators to the deque, but
|
| 30 |
has no effect on the validity of references to elements of the deque.
|
| 31 |
|
| 32 |
+
*Complexity:* The complexity is linear in the number of elements
|
| 33 |
+
inserted plus the lesser of the distances to the beginning and end of
|
| 34 |
+
the deque. Inserting a single element at either the beginning or end of
|
| 35 |
+
a deque always takes constant time and causes a single call to a
|
| 36 |
+
constructor of `T`.
|
| 37 |
+
|
| 38 |
*Remarks:* If an exception is thrown other than by the copy constructor,
|
| 39 |
move constructor, assignment operator, or move assignment operator of
|
| 40 |
`T` there are no effects. If an exception is thrown while inserting a
|
| 41 |
single element at either end, there are no effects. Otherwise, if an
|
| 42 |
exception is thrown by the move constructor of a
|
| 43 |
non-*Cpp17CopyInsertable* `T`, the effects are unspecified.
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
``` cpp
|
| 46 |
iterator erase(const_iterator position);
|
| 47 |
iterator erase(const_iterator first, const_iterator last);
|
| 48 |
void pop_front();
|
| 49 |
void pop_back();
|
|
|
|
| 59 |
to all the elements of the deque.
|
| 60 |
|
| 61 |
[*Note 1*: `pop_front` and `pop_back` are erase
|
| 62 |
operations. — *end note*]
|
| 63 |
|
| 64 |
+
*Throws:* Nothing unless an exception is thrown by the assignment
|
| 65 |
+
operator of `T`.
|
| 66 |
+
|
| 67 |
*Complexity:* The number of calls to the destructor of `T` is the same
|
| 68 |
as the number of elements erased, but the number of calls to the
|
| 69 |
assignment operator of `T` is no more than the lesser of the number of
|
| 70 |
elements before the erased elements and the number of elements after the
|
| 71 |
erased elements.
|
| 72 |
|
|
|
|
|
|
|
|
|