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

slist::slist
slist();
explicit slist(const A& al);
explicit slist(size_type n);
slist(size_type n, const T& v);
slist(size_type n, const T& v,
const A& al);
slist(const slist& x);
template<class InIt>
slist(InIt first, InIt last);
template<class InIt>
slist(InIt first, InIt last, const A& al);
All constructors store an allocator object and initialize the controlled sequence. The allocator
object is the argument al, if present. For the copy constructor, it is x.get_allocator().
Otherwise, it is A().
The first two constructors specify an empty initial controlled sequence. The third constructor
specifies a repetition of n elements of value T(). The fourth and fifth constructors specify a
repetition of n elements of value x. The sixth constructor specifies a copy of the sequence
controlled by x. If InIt is an integer type, the last two constructors specify a repetition of
(size_type)first elements of value (T)last. Otherwise, the last two constructors
specify the sequence [first, last). None of the constructors perform any interim
reallocations.
slist::sort
void sort();
template<class Pred>
void sort(Pred pr);
Both member functions order the elements in the controlled sequence by a predicate, described
below.
For the iterators Pi and Pj designating elements at positions i and j, the first member function
imposes the order !(*Pj < *Pi) whenever i < j. (The elements are sorted in ascending
order.) The member template function imposes the order !pr(*Pj, *Pi) whenever i < j.
No ordered pairs of elements in the original controlled sequence are reversed in the resulting
controlled sequence. (The sort is stable.)
An exception occurs only if pr throws an exception. In that case, the controlled sequence is left
in unspecified order and the exception is rethrown.