insert overloads

Synopses

Declared in <bslstl_unorderedmap.h>

Insert each element of values whose key is not already present.

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

Insert value if its key is not already present.

Insert value if its key is not already present.

template<class ALT_VALUE_TYPE>
pair<iterator, bool>
insert(ALT_VALUE_TYPE&& value)
requires std::is_constructible<value_type,
                                             ALT_VALUE_TYPE&&>::value;

Insert value at hint if its key is not already present.

iterator
insert(
    const_iterator hint,
    value_type const& value);

Insert each element in [first, last)] whose key is not already present.

template<class INPUT_ITERATOR>
void
insert(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last);

Insert value at hint if its key is not already present.

template<class ALT_VALUE_TYPE>
iterator
insert(
    const_iterator hint,
    ALT_VALUE_TYPE&& value)
requires std::is_constructible<value_type,
                                             ALT_VALUE_TYPE&&>::value;

Return Value

  • iterator to the element and whether insertion occurred

  • iterator to the existing or newly inserted element

Parameters

Name

Description

values

initializer list of values to insert

value

value to insert

hint

iterator hint for insertion

first

start of the range

last

end of the range (one past last)

Created with MrDocs