Try to emplace an element with key near hint.
Declared in <bslstl_map.h>
template<class... Args>
map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
try_emplace(
const_iterator hint,
BloombergLP::bslmf::MovableRef<KEY> key,
Args&&... args);
Insert at the specified hint using a movable key and the specified constructor args, or return an iterator to an existing entry.
iterator to the existing or newly inserted element
| Name | Description |
|---|---|
| hint | iterator hint for the insertion position |
| key | key for the element to emplace |
| args | constructor arguments for the mapped value |