Remove the entry with the specified key, if present.
Synopsis
Declared in <bdlc_flathashtable.h>
template<class LOOKUP_KEY>
std::size_t
erase(LOOKUP_KEY&& key)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
&& BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value;
Description
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.
Return Value
1 if an entry was erased, and 0 otherwise
Parameters
Name |
Description |
key |
key of the entry to remove |
Created with MrDocs