Try to emplace an element with transparent key near hint.
Declared in <bslstl_map.h>
template<
class LOOKUP_KEY,
class... Args>
iterator
try_emplace(
const_iterator hint,
LOOKUP_KEY&& key,
Args&&... args)
requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
LOOKUP_KEY>::value;
Insert at the specified hint using the transparent LOOKUP_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 | transparent key for the element to emplace |
| args | constructor arguments for the mapped value |