![]() |
Home | Libraries | People | FAQ | More |
Erase an element.
iterator erase( const_iterator pos);
Remove the element pointed to by pos
,
which must be valid and dereferenceable. References and iterators to
the erased element are invalidated. Other iterators and references are
not invalidated.
The end()
iterator (which is valid but
cannot be dereferenced) cannot be used as a value for pos
.
Constant on average, worst case linear in size()
.
No-throw guarantee.
An iterator following the removed element.
Name |
Description |
---|---|
|
An iterator pointing to the element to be removed. |