insert_or_assign overloads
Declared in <bdlc_flathashmap.h>
If this map contains an entry with a key equivalent to the specified key, assign the specified obj to the mapped_type of that entry, and return an iterator to that entry and false. Otherwise, insert a new entry into the map with the and return an iterator to that entry and true. obj is left in a (valid) unspecified state.
template<class M>
bsl::pair<FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator, bool>
insert_or_assign(
BloombergLP::bslmf::MovableRef<KEY> key,
M&& obj);
» more...
If this map contains an entry with a key equivalent to the specified key, assign the specified obj to the mapped_type of that entry, and return an iterator to that entry and false. Otherwise, insert a new entry into the map with the and return an iterator to that entry and true. obj is left in a (valid) unspecified state.
template<class M>
bsl::pair<FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator, bool>
insert_or_assign(
KEY const& key,
M&& obj);
» more...
If this map contains an entry with a key equivalent to the specified key, assign the specified obj to the mapped_type of that entry, and return an iterator to that entry and false. Otherwise, insert a new entry into the map with the and return an iterator to that entry and true. obj is left in a (valid) unspecified state.
template<
class LOOKUP_KEY,
class M>
bsl::pair<iterator, bool>
insert_or_assign(
LOOKUP_KEY&& key,
M&& obj)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
&& BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value;
» more...
If this map contains an entry with a key equivalent to the specified key, assign the specified obj to the mapped_type of that entry. Otherwise, insert a new entry into the map. Return an iterator to the inserted or updated entry. obj is left in a (valid) unspecified state.
template<class MAPPED>
FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator
insert_or_assign(
const_iterator,
BloombergLP::bslmf::MovableRef<KEY> key,
MAPPED&& obj);
» more...
If this map contains an entry with a key equivalent to the specified key, assign the specified obj to the mapped_type of that entry. Otherwise, insert a new entry into the map. Return an iterator to the inserted or updated entry. obj is left in a (valid) unspecified state.
template<class MAPPED>
FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator
insert_or_assign(
const_iterator,
KEY const& key,
MAPPED&& obj);
» more...
If this map contains an entry with a key equivalent to the specified key, assign the specified obj to the mapped_type of that entry. Otherwise, insert a new entry into the map. Return an iterator to the inserted or updated entry. obj is left in a (valid) unspecified state.
template<
class LOOKUP_KEY,
class MAPPED>
iterator
insert_or_assign(
const_iterator,
LOOKUP_KEY&& key,
MAPPED&& obj)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
&& BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value;
» more...