Standard C++ Library Reference ISO/IEC (VERSION3)

iterator erase(iterator first, iterator last);
void clear();
void swap(slist& x);
void splice(iterator it, slist& x);
void splice(iterator it, slist& x, iterator first);
void splice(iterator it, slist& x, iterator first,
iterator last);
void remove(const T& x);
templace<class Pred>
void remove_if(Pred pr);
void unique();
template<class Pred>
void unique(Pred pr);
void merge(slist& x);
template<class Pred>
void merge(slist& x, Pred pr);
void sort();
template<class Pred>
void sort(Pred pr);
void reverse();
};
The template class describes an object that controls a varying-length sequence of elements of
type T. The sequence is stored as a singly linked list of elements, each containing a member of
type T.
The object allocates and frees storage for the sequence it controls through a stored
allocatorobject of class A. 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.
List reallocation occurs when a member function must insert or erase elements of the
controlled sequence. In all such cases, only the following iterators or references become
invalid:
iterators that designated a position immediately beyond an inserted element
iterators that designate a position immediately beyond an erased element
iterators or references that designate an erased element
All additions to the controlled sequence occur as if by calls to insert, which is the only
member function that calls the constructor T(const T&). If such an expression throws an
exception, the container object inserts no new elements and rethrows the exception. Thus, an
object of template class slist is left in a known state when such exceptions occur.