[#boost-urls-segments_encoded_ref-erase-00a]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/segments_encoded_ref.adoc[segments&lowbar;encoded&lowbar;ref]::erase
:relfileprefix: ../../../
:mrdocs:

Erase segments

== Synopsis

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/segments_encoded_ref.hpp#L561[boost&sol;url&sol;segments&lowbar;encoded&lowbar;ref&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/segments_encoded_base/iterator.adoc[iterator]
erase(
    xref:boost/urls/segments_encoded_base/iterator.adoc[iterator] first,
    xref:boost/urls/segments_encoded_base/iterator.adoc[iterator] last) noexcept;
----

== Description

This function removes a range of segments from the container&period;

All iterators that are equal to `first` or come after are invalidated&period;

== Complexity

Linear in `this&hyphen;&gt;url()&period;encoded&lowbar;resource()&period;size()`&period;

== Exception Safety

Throws nothing&period;

== Return Value

An iterator to one past the removed range&period;

== Parameters

[cols=2]
|===
| Name
| Description
| *first*
| The first element in the range to erase&period;
| *last*
| One past the last element in the range to erase&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
