[#bsl-hash_map-erase-0a]
= xref:bsl.adoc[bsl]::xref:bsl/hash_map.adoc[hash&lowbar;map]::erase
:relfileprefix: ../../
:mrdocs:

`erase` overloads

== Synopses

Declared in `&lt;bslstp&lowbar;hashmap&period;h&gt;`

Erase the element at the specified iterator position&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/hash_map/erase-04.adoc[erase](xref:bsl/hash_map/iterator.adoc[iterator] position);
----

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

Erase the element with the specified `&lowbar;&lowbar;key` and return the count removed&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/hash_map/size_type.adoc[size&lowbar;type]
xref:bsl/hash_map/erase-03.adoc[erase](xref:bsl/hash_map/key_type.adoc[key&lowbar;type] const& &lowbar;&lowbar;key);
----

[.small]#xref:bsl/hash_map/erase-03.adoc[_» more&period;&period;&period;_]#

Erase the elements in the specified iterator range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/hash_map/erase-0e.adoc[erase](
    xref:bsl/hash_map/iterator.adoc[iterator] &lowbar;&lowbar;f,
    xref:bsl/hash_map/iterator.adoc[iterator] &lowbar;&lowbar;l);
----

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

== Return Value

number of elements erased

== Parameters

[cols="1,4"]
|===
| Name| Description
| *position*
| iterator referring to the element to erase
| *&lowbar;&lowbar;key*
| key of elements to erase
| *&lowbar;&lowbar;f*
| beginning of the erased range
| *&lowbar;&lowbar;l*
| end of the erased range (exclusive)
|===


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