[#BloombergLP-bdlc-FlatHashMap-insert_or_assign-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap]::insert_or_assign :relfileprefix: ../../../ :mrdocs: `insert_or_assign` overloads == Synopses 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class M> xref:bsl/pair-0b.adoc[bsl::pair<FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator, bool>] xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-05.adoc[insert_or_assign]( xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<KEY>] key, M&& obj); ---- [.small]#xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-05.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class M> xref:bsl/pair-0b.adoc[bsl::pair<FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator, bool>] xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-02.adoc[insert_or_assign]( KEY const& key, M&& obj); ---- [.small]#xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-02.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class LOOKUP_KEY, class M> xref:bsl/pair-0b.adoc[bsl::pair<iterator, bool>] xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-0a.adoc[insert_or_assign]( LOOKUP_KEY&& key, M&& obj) requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value; ---- [.small]#xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-0a.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class MAPPED> xref:BloombergLP/bdlc/FlatHashMap/iterator.adoc[FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator] xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-03.adoc[insert_or_assign]( xref:BloombergLP/bdlc/FlatHashMap/const_iterator.adoc[const_iterator], xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<KEY>] key, MAPPED&& obj); ---- [.small]#xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-03.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class MAPPED> xref:BloombergLP/bdlc/FlatHashMap/iterator.adoc[FlatHashMap<KEY, VALUE, HASH, EQUAL>::iterator] xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-01.adoc[insert_or_assign]( xref:BloombergLP/bdlc/FlatHashMap/const_iterator.adoc[const_iterator], KEY const& key, MAPPED&& obj); ---- [.small]#xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-01.adoc[_» 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class LOOKUP_KEY, class MAPPED> xref:BloombergLP/bdlc/FlatHashMap/iterator.adoc[iterator] xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-06.adoc[insert_or_assign]( xref:BloombergLP/bdlc/FlatHashMap/const_iterator.adoc[const_iterator], LOOKUP_KEY&& key, MAPPED&& obj) requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value; ---- [.small]#xref:BloombergLP/bdlc/FlatHashMap/insert_or_assign-06.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#