Insert the specified value into this unordered map if the key (the first element) of the object referred to by value does not already exist in this unordered map; otherwise, this method has no effect (a value_type object having the same key as the converted value already exists in this unordered map) . Return an iterator referring to ether the newly inserted) value_type object or to the existing object whose key is equivalent to the key of value. The average and worst case complexity of this operation is not affected by the specified hint. This method requires that the (template parameter) types KEY and VALUE both be move‐constructible (see {Requirements on value_type}) and that 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). Note that hint is ignored (other than possibly asserting its validity in some build modes). Also note that this one template stands in for three insert functions in the C++11 standard.
Synopsis
Declared in <bslstl_unorderedmap.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;
Created with MrDocs