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.

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

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.

std::size_t
erase(KEY const& key);

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.

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;

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.

Created with MrDocs