[#BloombergLP-bdlc-FlatHashSet-erase-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet]::erase :relfileprefix: ../../../ :mrdocs: `erase` overloads == Synopses Declared in `<bdlc_flathashset.h>` Remove the element at the specified `position`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/FlatHashSet/const_iterator.adoc[FlatHashSet<KEY, HASH, EQUAL>::const_iterator] xref:BloombergLP/bdlc/FlatHashSet/erase-0d.adoc[erase](xref:BloombergLP/bdlc/FlatHashSet/const_iterator.adoc[const_iterator] position); ---- [.small]#xref:BloombergLP/bdlc/FlatHashSet/erase-0d.adoc[_» more..._]# Remove the element with the specified `key`, if present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t xref:BloombergLP/bdlc/FlatHashSet/erase-01.adoc[erase](KEY const& key); ---- [.small]#xref:BloombergLP/bdlc/FlatHashSet/erase-01.adoc[_» more..._]# Remove the element equivalent to the specified `key`, if present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> std::size_t xref:BloombergLP/bdlc/FlatHashSet/erase-04.adoc[erase](LOOKUP_KEY&& key) requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value; ---- [.small]#xref:BloombergLP/bdlc/FlatHashSet/erase-04.adoc[_» more..._]# Remove the elements in the half‐open iterator range. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/FlatHashSet/const_iterator.adoc[FlatHashSet<KEY, HASH, EQUAL>::const_iterator] xref:BloombergLP/bdlc/FlatHashSet/erase-0c.adoc[erase]( xref:BloombergLP/bdlc/FlatHashSet/const_iterator.adoc[const_iterator] first, xref:BloombergLP/bdlc/FlatHashSet/const_iterator.adoc[const_iterator] last); ---- [.small]#xref:BloombergLP/bdlc/FlatHashSet/erase-0c.adoc[_» more..._]# == Return Value * iterator following the erased element * 1 if an element was erased, and 0 otherwise * iterator equal to `last` == Parameters [cols="1,4"] |=== | Name| Description | *position* | iterator to the element to remove | *key* | key of the element to remove | *first* | beginning of the range to erase | *last* | end of the range to erase (exclusive) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#