absl::linked_hash_map::insert

insert overloads

Synopses

Declared in <absl/container/linked_hash_map.h>

Inserts the elements of an initializer list into the map.

void
insert(std::initializer_list<value_type> ilist);
» more...

Inserts an element into the map.

std::pair<iterator, bool>
insert(value_type const& v);
» more...

Inserts an element via a node handle.

insert_return_type
insert(node_type&& node);
» more...

Inserts an element into the map.

std::pair<iterator, bool>
insert(value_type&& v);
» more...

Inserts an element into the map, ignoring the position hint.

iterator
insert(
    const_iterator hint,
    value_type const& v);
» more...

Inserts an element via a node handle, ignoring the position hint.

iterator
insert(
    const_iterator hint,
    node_type&& node);
» more...

Inserts an element into the map, ignoring the position hint.

iterator
insert(
    const_iterator hint,
    value_type&& v);
» more...

Inserts the elements of the range [first, last)] into the map.

template<class InputIt>
void
insert(
    InputIt first,
    InputIt last);
» more...

Return Value

  • A pair of an iterator to the element and a bool that is true if insertion took place.
  • The result of the insertion, including the node handle if insertion did not take place.
  • An iterator to the inserted or existing element.

Parameters

NameDescription
ilistThe initializer list of elements to insert.
vThe value to insert.
nodeThe node handle holding the element to insert.
hintA position hint, which is ignored.
firstAn iterator to the first element to insert.
lastAn iterator past the last element to insert.