Namespaces
Variants

std::deque<T,Allocator>::insert

From cppreference.com
 
 
 
 
iterator insert( const_iterator pos, const T& value );
(1)
iterator insert( const_iterator pos, T&& value );
(2) (since C++11)
iterator insert( const_iterator pos,
                 size_type count, const T& value );
(3)
template< class InputIt >
iterator insert( const_iterator pos, InputIt first, InputIt last );
(4)
iterator insert( const_iterator pos, std::initializer_list<T> ilist );
(5) (since C++11)

Inserts elements at the specified location in the container.

1) Inserts a copy of value before pos.
2) Inserts value before pos, possibly using move semantics.
3) Inserts count copies of the value before pos.
4) Inserts elements from range [firstlast) before pos.

This overload has the same effect as overload (3) if InputIt is an integral type.

(until C++11)

This overload participates in overload resolution only if InputIt qualifies as LegacyInputIterator, to avoid ambiguity with the overload (3).

(since C++11)
If first and last are iterators into *this, the behavior is undefined.
5) Inserts elements from initializer list ilist before pos.

All iterators (including the end() iterator) are invalidated. References are invalidated too, unless pos == begin() or pos == end(), in which case they are not invalidated.

Parameters

pos - iterator before which the content will be inserted (pos may be the end() iterator)
value - element value to insert
count - number of elements to insert
first, last - the pair of iterators defining the range of elements to insert (cannot be iterators into container for which insert is called)
ilist - std::initializer_list to insert the values from
Type requirements
-
T must meet the requirements of CopyAssignable and CopyInsertable in order to use overload (1).
-
T must meet the requirements of MoveAssignable and MoveInsertable in order to use overload (2).
-
T must meet the requirements of CopyAssignable and CopyInsertable in order to use overload (3).
-
T must meet the requirements of