:relfileprefix: ../../../
[#boost-urls-segments_encoded_ref-erase]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/segments_encoded_ref.adoc[pass:[segments_encoded_ref]]::erase

  


Erase segments



=== Synopsis
  

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/segments_encoded_base/iterator.adoc[iterator]
xref:boost/urls/segments_encoded_ref/erase-006.adoc[pass:[erase]](xref:boost/urls/segments_encoded_base/iterator.adoc[iterator] pos) noexcept;
----

[source,cpp,subs="verbatim,macros,-callouts"]
----
xref:boost/urls/segments_encoded_base/iterator.adoc[iterator]
xref:boost/urls/segments_encoded_ref/erase-00a.adoc[pass:[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 segment.



All iterators that are equal to
`pos` or come after are invalidated.

=== Linear in `this-&gt;url().encoded_resource().size()`.

=== Throws nothing.



=== Return Value


An iterator to one past
the removed segment.



=== Parameters

|===
| Name | Description 

| *pos*
| 
An iterator to the element.

| *first,*
| 
last The range of
segments to erase.

|===




