This effectively increases the container size by one and invalidates all iterators to the deque, but has no effect on the validity of references to elements of the deque.
Parameters
- x
- Value to be copied to the new element.
T is the first template parameter (the type of the elements stored in the deque container).
Return value
noneExample
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
The example uses push_back to add a new element to the container each time a new integer is read.
Complexity
Constant.See also
| deque::push_front | Insert element at beginning (public member function) |
| deque::pop_back | Delete last element (public member function) |
| deque::insert | Insert elements (public member function) |
