[#bsl-unordered_set-09-erase-018] = xref:bsl.adoc[bsl]::xref:bsl/unordered_set-09.adoc[unordered_set<Attribute, AttributeHash>]::erase :relfileprefix: ../../ :mrdocs: Remove from this set the `value_type` object that is equivalent to the specified `key`, if such an entry exists, and return 1; otherwise, if there is no `value_type` object that is equivalent to `key`, 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_unorderedset.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/unordered_set-09/size_type.adoc[size_type] erase(xref:bsl/unordered_set-09/key_type.adoc[key_type] const& key); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#