Standard C++ Library Class Reference

Removes the element pointed to by position. Returns an iterator pointing to the element following the
deleted element, or end() if the deleted item was the last one in this list.
iterator
erase (iterator first, iterator last);
Removes the elements in the range (first, last). Returns an iterator pointing to the element following the
element following the last deleted element, or end() if there were no elements after the deleted range.
reference
front ();
Returns a reference to the first element.
const_reference
front () const;
Returns a constant reference to the first element.
iterator
insert (iterator position);
Inserts a copy of the default value for type T before position. Returns an iterator that points to the
inserted value. Requires that type T have a default constructor.
iterator
insert (iterator position, const T& x);
Inserts x before position. Returns an iterator that points to the inserted x.
void
insert (iterator position, size_type n, const T& x);
Inserts n copies of x before position.
template <class InputIterator>
void
insert (iterator position, InputIterator first,
InputIterator last);
Inserts copies of the elements in the range [first, last) before position.
size_type
max_size () const;
Returns size() of the largest possible list.
void merge (list<T, Allocator>& x);
Merges a sorted x with a sorted self using operator<. For equal elements in the two lists, elements from
self will always precede the elements from x. The merge function leaves x empty.
template <class Compare>
void
merge (list<T, Allocator>& x, Compare comp);
Merges a sorted x with sorted self using a compare function object, comp. For same elements in the two
lists, elements from self will always precede the elements from x. The merge function leaves x empty.
void
pop_back ();
Removes the last element.