Boost.URL Logo

PrevUpHomeNext
segments::erase (1 of 2 overloads)

Erase an element.

Synopsis
iterator
erase(
    iterator pos);
Description

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.

Preconditions

pos points to a valid element in this container.

Example
url u = parse_relative_uri( "/path/to/file.txt" );

segments se = u.segments();

se.erase( se.begin() + 1 );

assert( u.encoded_path() == "/path/file.txt" );
Exception Safety

Throws nothing.

Return Value

An iterator following the last element erased.

Parameters

Name

Description

pos

An iterator to the element to erase.


PrevUpHomeNext