absl::linked_hash_map::erase

erase overloads

Synopses

Declared in <absl/container/linked_hash_map.h>

Removes the element at the given position.

iterator
erase(const_iterator position);
» more...

Removes the element at the given position.

iterator
erase(iterator position);
» more...

Removes the element with the given key.

template<class K = key_type>
size_type
erase(key_arg<K> const& key);
» more...

Removes the elements in the range [first, last)].

iterator
erase(
    const_iterator first,
    const_iterator last);
» more...

Removes the elements in the range [first, last)].

iterator
erase(
    iterator first,
    iterator last);
» more...

Return Value

  • An iterator to the element following the erased element.
  • The number of elements removed (0 or 1).
  • An iterator to the element following the last erased element.

Parameters

NameDescription
positionAn iterator to the element to erase.
keyThe key to erase.
firstAn iterator to the first element to erase.
lastAn iterator past the last element to erase.