BloombergLP::bdlc::FlatHashTable::erase

erase overloads

Synopses

Declared in <bdlc_flathashtable.h>

Remove the entry at the specified position.

FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator
erase(const_iterator position);
» more...

Same as the preceding overload for a non-const iterator.

FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator
erase(iterator position);
» more...

Remove the entry with the specified key, if present.

std::size_t
erase(KEY const& key);
» more...

Remove the entry with the specified key, if present.

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;
» more...

Remove the entries in the half-open range [first, last)].

FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator
erase(
    const_iterator first,
    const_iterator last);
» more...

Return Value

  • iterator following the erased entry
  • 1 if an entry was erased, and 0 otherwise
  • iterator equal to last

Parameters

NameDescription
positioniterator to the entry to remove
keykey of the entry to remove
firstbeginning of the range to erase
lastend of the range to erase