...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Erase elements from the container.
iterator erase( const_iterator first, const_iterator last);
The elements in the range {first, last)
are removed.
Linear in std::distance(first, last) + std::distance(pos, end())
No-throw guarantee.
Name |
Description |
---|---|
|
An iterator pointing to the first element to erase, or pointing to the end of the range. |
|
An iterator pointing to one past the last element to erase, or pointing to the end of the range. |
Iterator following the last removed element. If the iterator pos
refers to the last element, the
end()
iterator is returned.