absl::linked_hash_set::insert

insert overloads

Synopses

Declared in <absl/container/linked_hash_set.h>

Inserts the elements from an initializer list.

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

Inserts an element extracted as a node handle.

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

Inserts an element into the set.

template<typename K = key_type>
std::pair<iterator, bool>
insert(key_arg<K> const& k);
» more...

Inserts an element into the set.

template<
    typename K = key_type,
    K* = nullptr>
std::pair<iterator, bool>
insert(key_arg<K>&& k);
» more...

Inserts an element extracted as a node handle, using a position hint.

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

Inserts the elements from the range [first, last)].

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

Inserts an element into the set using a position hint.

template<typename K = key_type>
requires !std::is_convertible_v<const key_arg<K>&, const_iterator> &&
                    !std::is_convertible_v<const key_arg<K>&, iterator>
iterator
insert(
    const_iterator hint,
    key_arg<K> const& k);
» more...

Inserts an element into the set using a position hint.

template<
    typename K = key_type,
    K* = nullptr>
requires !std::is_convertible_v<key_arg<K>&&, const_iterator> &&
                           !std::is_convertible_v<key_arg<K>&&, iterator>
iterator
insert(
    const_iterator hint,
    key_arg<K>&& k);
» more...

Return Value

  • An insert_return_type describing the result.
  • A pair of an iterator to the element and a bool that is true if insertion took place.
  • An iterator to the inserted or existing element.

Parameters

NameDescription
ilistThe initializer list of elements to insert.
nodeThe node handle to insert.
kThe 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.