Standard C++ Library Reference ISO/IEC (VERSION3)
sequence require element copies and assignments proportional to the number of elements in the
sequence (linear time).
The object allocates and frees storage for the sequence it controls through a stored allocator
object of class Alloc. Such an allocator object must have the same external interface as an
object of template class allocator. Note that the stored allocator object is not copied when
the container object is assigned.
Deque reallocation occurs when a member function must insert or erase elements of the
controlled sequence:
If an element is inserted into an empty sequence, or if an element is erased to leave an
empty sequence, then iterators earlier returned by begin() and end() become invalid.
●
If an element is inserted at begin() or at end(), then all iterators become invalid, but
no references that designate existing elements become invalid.
●
If an element is erased at begin() or at end(), then only iterators and references that
designate the erased element become invalid.
●
Otherwise, inserting or erasing an element invalidates all iterators and references.●
deque::allocator_type
typedef Alloc allocator_type;
The type is a synonym for the template parameter Alloc.
deque::assign
template<class InIt>
void assign(InIt first, InIt last);
void assign(size_type count, const Ty& val);
If InIt is an integer type, the first member function behaves the same as
assign((size_type)first, (Ty)last). Otherwise, the first member function
replaces the sequence controlled by *this with the sequence [first, last), which must
not overlap the initial controlled sequence. The second member function replaces the sequence
controlled by *this with a repetition of count elements of value val.
deque::at
const_reference at(size_type pos) const;
reference at(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 function throws an object of class out_of_range.