[#boost-urls-params_ref-erase-05]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/params_ref.adoc[params&lowbar;ref]::erase
:relfileprefix: ../../../
:mrdocs:

Erase elements

== Synopsis

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

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

== Description

This function removes an element from the container&period;

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

== Example

[,cpp]
----
url u( "?first=John&last=Doe" );

params_ref::iterator it = u.params().erase( u.params().begin() );

assert( u.encoded_query() == "last=Doe" );
----
== Complexity

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

== Exception Safety

Throws nothing&period;

== Return Value

An iterator to one past the removed element&period;

== Parameters

[cols="1,4"]
|===
|Name|Description

| *pos*
| An iterator to the element&period;
|===


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