iterator erase( const_iterator pos );
iterator erase( const_iterator first, const_iterator last );
size_type erase( const key_type& key );
Removes specified elements from the container.
[first; last), which must be a valid range in *this.
References and iterators to the erased elements are invalidated. Other iterators and references are not invalidated.
pos must be valid and dereferenceable. Thus the end() iterator (which is valid, but is not dereferencable) cannot be used as a value for
The order of the elements that are not erased is preserved (this makes it possible to erase individual elements while iterating through the container)
|pos||-||iterator to the element to remove|
|first, last||-||range of elements to remove|
|key||-||key value of the elements to remove|
Given an instance
| clears the contents |
(public member function)