Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 064f557086.
PrevUpHomeNext
object::stable_erase (1 of 2 overloads)

Erase an element preserving order.

Synopsis
iterator
stable_erase(
    const_iterator pos);
Description

Remove the element pointed to by pos, which must be valid and dereferenceable. References and iterators from pos to end(), both included, are invalidated. Other iterators and references are not invalidated. The relative order of remaining elements is preserved.

Remarks

The end() iterator (which is valid but cannot be dereferenced) cannot be used as a value for pos.

Complexity

Linear in size().

Exception Safety

No-throw guarantee.

Return Value

An iterator following the removed element.

Parameters

Name

Description

pos

An iterator pointing to the element to be removed.


PrevUpHomeNext