[#BloombergLP-bdlc-FlatHashSet-erase-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet]::erase :relfileprefix: ../../../ :mrdocs: Remove the element with the specified `key`, if present. == Synopsis Declared in `<bdlc_flathashset.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t erase(KEY const& key); ---- == Description Remove from this set the element whose key is equal to the specified `key`, if it exists, and return 1; otherwise (there is no element having `key` in this set), return 0 with no other effect. This method invalidates all iterators and references to the removed element. == Return Value 1 if an element was erased, and 0 otherwise == Parameters [cols="1,4"] |=== | Name| Description | *key* | key of the element to remove |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#