Erase an element.
iterator erase( iterator pos);
This function erases the element pointed to by pos
,
which must be a valid iterator for the container. All references and
iterators starting from pos and up to and including the last element
and end
iterators are invalidated.
pos
points to a valid
element in this container.
url u = parse_relative_uri( "/path/to/file.txt" ); segments_encoded se = u.encoded_segments(); se.erase( se.begin() + 1 ); assert( u.encoded_path() == "/path/file.txt" );
Throws nothing.
An iterator following the last element erased.
Name |
Description |
---|---|
|
An iterator to the element to erase. |