Standard C++ Library Reference ISO/IEC (VERSION3)

Each of the member functions inserts, before the element pointed to by where in the controlled
sequence, a sequence specified by the remaining operands. The first member function inserts a
single element with value val and returns an iterator that points to the newly inserted element.
The second member function inserts a repetition of count elements of value val.
If InIt is an integer type, the last member function behaves the same as insert(where,
(size_type)first, (Ty)last). Otherwise, the last member function inserts the
sequence [first, last), which must not overlap the initial controlled sequence.
When inserting a single element, the number of element copies is linear in the number of
elements between the insertion point and the nearer end of the sequence. When inserting a
single element at either end of the sequence, the amortized number of element copies is
constant. When inserting N elements, the number of element copies is linear in N plus the
number of elements between the insertion point and the nearer end of the sequence -- except
when the template member is specialized for InIt an input or forward iterator, which behaves
like N single insertions. Inserting an element at either end invalidates all iterators, but no
references, that designate existing elements. Otherwise, inserting an element invalidates all
iterators and references.
If an exception is thrown during the insertion of one or more elements, and the exception is not
thrown while copying an element, the container is left unaltered and the exception is rethrown.
deque::iterator
typedef T0 iterator;
The type describes an object that can serve as a random-access iterator for the controlled
sequence. It is described here as a synonym for the implementation-defined type T0.
deque::max_size
size_type max_size() const;
The member function returns the length of the longest sequence that the object can control.
deque::operator[]
const_reference operator[](size_type pos) const;
reference operator[](size_type pos);
The member function returns a reference to the element of the controlled sequence at position
pos. If that position is invalid, the behavior is undefined.