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

Remove all elements whose keys compare equivalent to the specified transparent `key`, and return the number of elements erased&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;KEY&gt;
xref:bsl/multimap-0ae/size_type.adoc[size&lowbar;type]
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]#Created with https://www.mrdocs.com[MrDocs]#
