try_emplace overloads
Declared in <bslstl_map.h>
Try to emplace an element with a movable key.
template<class... Args>
pair<map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator, bool>
try_emplace(
BloombergLP::bslmf::MovableRef<KEY> key,
Args&&... args);
» more...
Try to emplace an element with key constructed from args.
template<class... Args>
pair<map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator, bool>
try_emplace(
KEY const& key,
Args&&... args);
» more...
Try to emplace an element with transparent key.
template<
class LOOKUP_KEY,
class... Args>
pair<iterator, bool>
try_emplace(
LOOKUP_KEY&& key,
Args&&... args)
requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
LOOKUP_KEY>::value &&
!bsl::is_convertible<LOOKUP_KEY&&, const_iterator>::value &&
!bsl::is_convertible<LOOKUP_KEY&&, iterator>::value;
» more...
Try to emplace an element with key near hint.
template<class... Args>
map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
try_emplace(
const_iterator hint,
BloombergLP::bslmf::MovableRef<KEY> key,
Args&&... args);
» more...
Try to emplace an element with key near hint.
template<class... Args>
map<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
try_emplace(
const_iterator hint,
KEY const& key,
Args&&... args);
» more...
Try to emplace an element with transparent key near hint.
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;
» more...
| Name | Description |
|---|---|
| key | key to move into the new element |
| args | constructor arguments for the mapped value |
| hint | iterator hint for the insertion position |