Insert a value_type constructed from value near hint.

Synopsis

Declared in <bslstl_unorderedmultimap.h>

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

Description

Insert into this unordered multimap a value_type object created from the specified value (in constant time if the specified hint refers to an element in this container with a key equivalent to the key of value), and return an iterator referring to the newly inserted value_type object. If hint does not refer to an element in this container with a key equivalent to the key of value, this operation has worst case O[N] and average case constant‐time complexity, where N is the size of this unordered multimap. This method requires that the (template parameter) types KEY and VALUE both be move‐insertable into this unordered multimap (see {Requirements on KEY and VALUE}), and the value_type be constructible from the (template parameter) ALT_VALUE_TYPE. The behavior is undefined unless hint is an iterator in the range [begin() .. end()] (both endpoints included).

Return Value

iterator referring to the newly inserted element

Parameters

Name

Description

hint

iterator hint for insertion position

value

source used to construct the inserted element

Created with MrDocs