bsl::unordered_map::insert

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 key equivalent to the key of 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 copy-insertable into this unordered map (see {Requirements on 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).

Synopsis

Declared in <bslstl_unorderedmap.h>

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