Standard C++ Library Class Reference

void clear();
};
// Non-member Operators
template <class T, class Allocator>
bool operator== (const deque<T, Allocator>&,
const deque<T, Allocator>&);
template <class T, class Allocator>
bool operator< (const deque<T, Allocator>&,
const deque<T, Allocator>&);
// Specialized Algorithms
template <class T, class Allocator>
voice swap (deque<T, Allocator>&, deque<T, Allocator>&);
Constructors and Destructor
explicit
deque (const Allocator& alloc = Allocator());
The default constructor. Creates a deque of zero elements. The deque will use the
allocator alloc for all storage management.
explicit
deque (size_type n, const Allocator& alloc = Allocator());
Creates a list of length n, containing n copies of the default value for type T. Requires
that T have a default constructor. The deque will use the allocator alloc for all storage
management.
deque (size_type n, const T& value,
const Allocator& alloc = Allocator());
Creates a list of length n, containing n copies of value. The deque will use the allocator
alloc for all storage management.
deque (const deque<T, Allocator>& x);
Copy constructor. Creates a copy of x.
template <class InputIterator>
deque (InputIterator first, InputIterator last,
const Allocator& alloc = Allocator());
Creates a deque of length last - first, filled with all values obtained by dereferencing the
InputIterators on the range [first, last). The deque will use the allocator alloc for all
storage management.
~deque ();
The destructor. Releases any allocated memory for self.