:relfileprefix: ../../../
[#5A6BA503439FA9FC73718E16938825A66EAD6CCB]

= Function params_ref::erase

pass:v,q[Erase elements]


== Synopsis

Declared in header `</boost/url/params_ref.hpp#L595[boost/url/params_ref.hpp,window=blank_]>`

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

== Description

pass:v,q[This function removes an element from] pass:v,q[the container.]
pass:v,q[All iterators that are equal to]
pass:v,q[`pos` or come after are invalidated.]

=== 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
pass:v,q[Linear in `this->url().encoded_query().size()`.]

=== Exception Safety
pass:v,q[Throws nothing.]



== Return Value

* `iterator` 


== Parameters

|===
| Name | Type 

| *pos*
| `iterator`

|===



