bool operator<(const slist&, const slist&) Forward Container Lexicographical comparison. This is a global function, not a member function.
New members

These members are not defined in the Front Insertion Sequence requirements, but are specific to slist:

Function Description
iterator previous(iterator pos) pos must be a valid iterator in *this. The return value is an iterator prev such that ++prev == pos. Complexity: linear in the number of iterators in the range [begin(), pos).
const_iterator previous(const_iterator pos) pos must be a valid iterator in *this. The return value is an iterator prev such that ++prev == pos. Complexity: linear in the number of iterators in the range [begin(), pos).
iterator insert_after(iterator pos) pos must be a dereferenceable iterator in *this. (That is, pos may not be end() .) Inserts a copy of T() immediately followingpos. The return value is an iterator that points to the new element. Complexity: constant time.
iterator insert_after(iterator pos, const value_type& x) pos must be a dereferenceable iterator in *this. (That is, pos may not be end() .) Inserts a copy of x immediately followingpos. The return value is an iterator that points to the new element. Complexity: constant time.
template<class InputIterator> void insert_after(iterator pos, InputIterator f, InputIterator l) Inserts elements from the range [f, l) immediately followingpos. Complexity: linear in last – first.
void insert_after(iterator pos, size_type n, const value_type& x) Inserts n copies of x immediately followingpos. Complexity: linear in n.
iterator erase_after(iterator pos) Erases the element pointed to by the iterator followingpos. Complexity: constant time.
iterator erase_after(iterator before_first, iterator last) Erases all elements in the range [before_first + 1, last) . Complexity: linear in last – (before_first + 1).
void splice(iterator position, slist<T, Alloc>& x); position must be a valid iterator in *this, and x must be an slist 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. [4] Complexity: proportional to c1 (position – begin()) + c2(x.size()) , where c1 and c2 are unknown constants.
void splice(iterator position, slist<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. [4] If position == i or position == + +i, this function is a null operation. Complexity: proportional to c1(position – begin()) + c2(i – x.begin()), where c1 and c2 are unknown constants.
void splice(iterator position, slist<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. [4] Complexity: proportional to c1(position – begin()) + c2(f – x.begin()) + c3(l – f) , where c1, c2, and
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

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

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