[#bsl-unordered_map-02b-erase-005] = xref:bsl.adoc[bsl]::xref:bsl/unordered_map-02b.adoc[unordered_map]::erase :relfileprefix: ../../ :mrdocs: Remove from this unordered map the `value_type` object having the specified `key`, if it exists, and return 1; otherwise (there is no object with a key equivalent to `key` in this unordered map) return 0 with no other effect. 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. == Synopsis Declared in `<bslstl_unorderedmap.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_map-02b/size_type.adoc[size_type] erase(xref:bsl/unordered_map-02b/key_type.adoc[key_type] const& key); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#