Standard C++ Library Reference ISO/IEC (VERSION3)
list::list
list();
explicit list(const Alloc& al);
explicit list(size_type count);
list(size_type count, const Ty& val);
list(size_type count, const Ty& val,
const Alloc& al);
list(const list& right);
template<class InIt>
list(InIt first, InIt last);
template<class InIt>
list(InIt first, InIt last, const Alloc& 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
right.get_allocator(). Otherwise, it is Alloc().
The first two constructors specify an empty initial controlled sequence. The third constructor
specifies a repetition of count elements of value Ty(). The fourth and fifth constructors
specify a repetition of count elements of value val. The sixth constructor specifies a copy of
the sequence controlled by right. If InIt is an integer type, the last two constructors specify
a repetition of (size_type)first elements of value (Ty)last. Otherwise, the last two
constructors specify the sequence [first, last). None of the constructors perform any
interim reallocations.
list::max_size
size_type max_size() const;
The member function returns the length of the longest sequence that the object can control.
list::merge
void merge(list& right);
template<class Pr3>
void merge(list& right, Pre3 pred);
Both member functions remove all elements from the sequence controlled by right and insert
them in the controlled sequence. Both sequences must be ordered by the same predicate,
described below. The resulting sequence is also ordered by that predicate.
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 second member function imposes the order !pred(*Pj, *Pi) whenever I <
J.