Standard C++ Library Class Reference
void
pop_front ();
Removes the first element.
void
push_back (const T& x);
Appends a copy of x to the end of the list.
void
push_front (const T& x);
Appends a copy of x to the front of the list.
void
remove (const T& value);
template <class Predicate>
void
remove_if (Predicate pred);
Removes all elements in the list referred by the list iterator i for which *i == value or pred(*i) == true,
whichever is applicable. This is a stable operation, the relative order of list items that are not removed is
preserved.
void
resize (size_type sz);
Alters the size of self. If the new size ( sz ) is greater than the current size, sz-size() copies of the default
value of type T are inserted at the end of the list. If the new size is smaller than the current capacity,
then the list is truncated by erasing size()-sz elements off the end. Otherwise, no action is taken.
Requires that type T have a default constructor.
void
resize (size_type sz, T c);
Alters the size of self. If the new size ( sz ) is greater than the current size, sz-size() c's are inserted at
the end of the list. If the new size is smaller than the current capacity, then the list is truncated by
erasing size()-sz elements off the end. Otherwise, no action is taken.
void
reverse ();
Reverses the order of the elements.
size_type
size () const;
Returns the number of elements.
void
sort ();
Sorts self according to the operator<. sort maintains the relative order of equal elements.
template <class Compare>
void
sort (Compare comp);
Sorts self according to a comparison function object, comp. This is also a stable sort.
void