void resize(n, t = T()) Sequence Inserts or erases elements at the end such that the size becomes n.
void splice(iterator pos, list& L) list See below.
void splice(iterator pos, list& L, iterator i) list See below.
void splice(iterator pos, list& L, iterator f, iterator l) list See below.
void remove(const T& value) list See below.
void unique() list See below.
void merge(list& L) list See below.
void sort() list See below.
bool operator==(const list&, const list&) Forward Container Tests two lists for equality. This is a global function, not a member function.
bool operator<(const list&, const list&) Forward Container Lexicographical comparison. This is a global function, not a member function.
New members

These members are not defined in the Reversible Container, Front Insertion Sequence, and Back Insertion Sequence requirements, but are specific to list.

Function Description
void splice(iterator position, list<T, Alloc>& x); position must be a valid iterator in *this, and x must be a list that is distinct from *this. (That is, it is required that &x != this.) All of the elements of x are inserted before position and removed from x. All iterators remain valid, including iterators that point to elements of x. [3] This function is constant time.
void splice(iterator position, list<T, Alloc>& x, iterator i); position must be a valid iterator in *this, and i must be a dereferenceable iterator in x. Splice moves the element pointed to by i from x to *this, inserting it before position. All iterators remain valid, including iterators that point to elements of x. [3] If position == i or position == + +i, this function is a null operation. This function is constant time.
void splice(iterator position, list<T, Alloc>& x, iterator f, iterator l); position must be a valid iterator in *this, and [first, last) must be a valid range in x. position may not be an iterator in the range [first, last). Splice moves the elements in [first, last) from x to *this , inserting them before position. All iterators remain valid, including iterators that point to elements of x. [3] This function is constant time.
void remove(const T& val); Removes all elements that compare equal to val. The relative order of elements that are not removed is unchanged, and iterators to elements that are not removed remain valid. This function is linear time: it performs exactly size() comparisons for equality.
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату