[#BloombergLP-bdlc-FlatHashTable-erase-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashTable.adoc[FlatHashTable]::erase :relfileprefix: ../../../ :mrdocs: `erase` overloads == Synopses Declared in `<bdlc_flathashtable.h>` Remove from this table the object at the specified `position`, and return an iterator referring to the element immediately following the removed element, or to the past‐the‐end position if the removed element was the last element in the sequence of elements maintained by this table. This method invalidates all iterators, and references to the removed element. The behavior is undefined unless `position` refers to an object in this table. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator] xref:BloombergLP/bdlc/FlatHashTable/erase-0e.adoc[erase](xref:BloombergLP/bdlc/FlatHashTable/const_iterator.adoc[const_iterator] position); ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-0e.adoc[_» more..._]# Same as the preceding overload for a non‐const `iterator`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator] xref:BloombergLP/bdlc/FlatHashTable/erase-08.adoc[erase](xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[iterator] position); ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-08.adoc[_» more..._]# Remove from this table the object having the specified `key`, if it exists, and return 1; otherwise (there is no object with a key equal to `key` in this table) return 0 with no other effect. This method invalidates all iterators, and references to the removed element. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::size_t xref:BloombergLP/bdlc/FlatHashTable/erase-0d.adoc[erase](KEY const& key); ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-0d.adoc[_» more..._]# Remove from this table the object having the specified `key`, if it exists, and return 1; otherwise (there is no object with a key equal to `key` in this table) return 0 with no other effect. This method invalidates all iterators, and references to the removed element. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> std::size_t xref:BloombergLP/bdlc/FlatHashTable/erase-06.adoc[erase](LOOKUP_KEY&& key) requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value; ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-06.adoc[_» more..._]# Remove from this table the objects starting at the specified `first` position up to, but not including, the specified `last` position, and return `last`. This method invalidates all iterators, and references to the removed element. The behavior is undefined unless `first` and `last` either refer to elements in this table or are the `end` iterator, and the `first` position is at or before the `last` position in the iteration sequence provided by this container. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/FlatHashTable/iterator.adoc[FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator] xref:BloombergLP/bdlc/FlatHashTable/erase-0b.adoc[erase]( xref:BloombergLP/bdlc/FlatHashTable/const_iterator.adoc[const_iterator] first, xref:BloombergLP/bdlc/FlatHashTable/const_iterator.adoc[const_iterator] last); ---- [.small]#xref:BloombergLP/bdlc/FlatHashTable/erase-0b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#