Insert or assign the mapped value for key using a hint.
Declared in <bdlc_flathashmap.h>
template<
class LOOKUP_KEY,
class MAPPED>
iterator
insert_or_assign(
const_iterator hint,
LOOKUP_KEY&& key,
MAPPED&& obj)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
&& BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value;
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.
iterator to the inserted or updated element
| Name | Description |
|---|---|
| hint | iterator hint (ignored) |
| key | transparent key to insert or update |
| obj | mapped value to assign or move-insert |