[#bsl-multimap-0ae-erase-039]
= xref:bsl.adoc[bsl]::xref:bsl/multimap-0ae.adoc[multimap]::erase
:relfileprefix: ../../
:mrdocs:

`erase` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;multimap&period;h&gt;`

Erase the element at `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/multimap-0ae/iterator.adoc[multimap&lt;KEY, VALUE, COMPARATOR, ALLOCATOR&gt;::iterator]
xref:bsl/multimap-0ae/erase-0cd.adoc[erase](xref:bsl/multimap-0ae/const_iterator.adoc[const&lowbar;iterator] position);
----

[.small]#xref:bsl/multimap-0ae/erase-0cd.adoc[_» more&period;&period;&period;_]#

Erase the element at `position`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/multimap-0ae/iterator.adoc[multimap&lt;KEY, VALUE, COMPARATOR, ALLOCATOR&gt;::iterator]
xref:bsl/multimap-0ae/erase-0e.adoc[erase](xref:bsl/multimap-0ae/iterator.adoc[iterator] position);
----

[.small]#xref:bsl/multimap-0ae/erase-0e.adoc[_» more&period;&period;&period;_]#

Erase all elements whose keys are equivalent to `key`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/multimap-0ae/size_type.adoc[multimap&lt;KEY, VALUE, COMPARATOR, ALLOCATOR&gt;::size&lowbar;type]
xref:bsl/multimap-0ae/erase-03d.adoc[erase](xref:bsl/multimap-0ae/key_type.adoc[key&lowbar;type] const& key);
----

[.small]#xref:bsl/multimap-0ae/erase-03d.adoc[_» more&period;&period;&period;_]#

Erase all elements matching `key`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;KEY&gt;
xref:bsl/multimap-0ae/size_type.adoc[size&lowbar;type]
xref:bsl/multimap-0ae/erase-0c5.adoc[erase](t&lowbar;KEY&& key)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;COMPARATOR,
                                                   t&lowbar;KEY&gt;&colon;&colon;value &amp;&amp;
        !is&lowbar;convertible&lt;BSLS&lowbar;COMPILERFEATURES&lowbar;FORWARD&lowbar;REF(t&lowbar;KEY),
                        iterator&gt;&colon;&colon;value &amp;&amp;
        !is&lowbar;convertible&lt;BSLS&lowbar;COMPILERFEATURES&lowbar;FORWARD&lowbar;REF(t&lowbar;KEY),
                        const&lowbar;iterator&gt;&colon;&colon;value;
----

[.small]#xref:bsl/multimap-0ae/erase-0c5.adoc[_» more&period;&period;&period;_]#

Erase the half&hyphen;open range `&lsqb;first, last)&rsqb;` from this multimap&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/multimap-0ae/iterator.adoc[multimap&lt;KEY, VALUE, COMPARATOR, ALLOCATOR&gt;::iterator]
xref:bsl/multimap-0ae/erase-04.adoc[erase](
    xref:bsl/multimap-0ae/const_iterator.adoc[const&lowbar;iterator] first,
    xref:bsl/multimap-0ae/const_iterator.adoc[const&lowbar;iterator] last);
----

[.small]#xref:bsl/multimap-0ae/erase-04.adoc[_» more&period;&period;&period;_]#

== Return Value

* iterator to the element following the erased element
* number of elements erased
* `last`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator to the element to erase
| *key*
| key whose matching elements are erased
| *first*
| iterator to the first element to erase
| *last*
| iterator past the last element to erase
|===


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