Standard C++ Library Class Reference

// Specialized Algorithms
template <class T, class Allocator>
void swap (list<T,Allocator>&, list<T, Allocator>&);
Constructors and Destructors
explicit list (const Allocator& alloc = Allocator());
Creates a list of zero elements. The list will use the allocator alloc for all storage management.
explicit list (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 list will use the allocator alloc for all storage management.
list (size_type n, const T& value,
const Allocator& alloc = Allocator());
Creates a list of length n, containing n copies of value. The list will use the allocator alloc for all storage
management.
template <class InputIterator>
list (InputIterator first, InputIterator last,
const Allocator& alloc = Allocator());
Creates a list of length last - first, filled with all values obtained by dereferencing the InputIterators on
the range [first, last). The list will use the allocator alloc for all storage management.
list (const list<T, Allocator>& x);
Copy constructor. Creates a copy of x.
~list ();
The destructor. Releases any allocated memory for this list.
Assignment Operator
list<T, Allocator>& operator= (const list<T, Allocator>& x)
Erases all elements in self then inserts into self a copy of each element in x. Returns a reference to *this.
Allocator
allocator_type get_allocator () const;
Returns a copy of the allocator used by self for storage management.
Iterators
iterator begin ();
Returns a bidirectional iterator that points to the first element.
const_iterator begin () const;
Returns a constant bidirectional iterator that points to the first element.
iterator end ();