cptr::detail::basic_unordered_map::insert

insert overloads

Synopses

Declared in <cptr/unordered_map.hpp>

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

Insert a copy of kv unless its key is present. Strong guarantee.

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

Insert an element built from kv (such as a moved pair) unless its key is present.

template<class P>
requires std::is_constructible_v<value_type, P&&>
std::pair<iterator, bool>
insert(P&& kv);
» more...

insert() with a hint, which is not used; returns the element with the key. With these, std::inserter(m, m.end()) works.

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

Insert each element of [first, last) whose key is not present yet.] If one throws, the elements inserted before it stay.

template<std::input_iterator It>
void
insert(
    It first,
    It last);
» more...

insert() with a hint, which is not used; returns the element with the key.

template<class P>
requires std::is_constructible_v<value_type, P&&>
iterator
insert(
    const_iterator,
    P&& kv);
» more...