Try to emplace an element with key near hint.
Synopsis
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);
Description
Insert at the specified hint using a movable key and the specified constructor args, or return an iterator to an existing entry.
Return Value
iterator to the existing or newly inserted element
Parameters
Name |
Description |
hint |
iterator hint for the insertion position |
key |
key for the element to emplace |
args |
constructor arguments for the mapped value |
Created with MrDocs