[#bsl-unordered_map-0bf-erase-0e]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_map-0bf.adoc[unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;]::erase
:relfileprefix: ../../
:mrdocs:

Remove from this unordered map the `value&lowbar;type` object having the specified `key`, if it exists, and return 1&semi; otherwise (there is no object with a key equivalent to `key` in this unordered map) return 0 with no other effect&period; This method invalidates only iterators and references to the removed element and previously saved values of the `end()` iterator, and preserves the relative order of the elements not removed&period;

== Synopsis

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

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


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