[#BloombergLP-bslstl-HashTable-insertIfMissing-00d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable.adoc[HashTable]::insertIfMissing :relfileprefix: ../../../ :mrdocs: `insertIfMissing` overloads == Synopses Declared in `<bslstl_hashtable.h>` Insert a default‐mapped value for a movable `key` if missing. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/insertIfMissing-02.adoc[insertIfMissing](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<NonConstKeyType>] key); ---- [.small]#xref:BloombergLP/bslstl/HashTable/insertIfMissing-02.adoc[_» more..._]# Insert a default‐mapped value for `key` if the key is missing. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/insertIfMissing-0548.adoc[insertIfMissing](xref:BloombergLP/bslstl/HashTable/KeyType.adoc[KeyType] const& key); ---- [.small]#xref:BloombergLP/bslstl/HashTable/insertIfMissing-0548.adoc[_» more..._]# Insert a movable `value` if no equivalent key is present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/insertIfMissing-06.adoc[insertIfMissing]( bool* isInsertedFlag, xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<ValueType>] value); ---- [.small]#xref:BloombergLP/bslstl/HashTable/insertIfMissing-06.adoc[_» more..._]# Insert `value` if no equivalent key is present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/insertIfMissing-0549.adoc[insertIfMissing]( bool* isInsertedFlag, xref:BloombergLP/bslstl/HashTable/ValueType.adoc[ValueType] const& value); ---- [.small]#xref:BloombergLP/bslstl/HashTable/insertIfMissing-0549.adoc[_» more..._]# Insert a value from `value` if no equivalent key is present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class SOURCE_TYPE> xref:BloombergLP/bslalg/BidirectionalLink.adoc[bslalg::BidirectionalLink]* xref:BloombergLP/bslstl/HashTable/insertIfMissing-005.adoc[insertIfMissing]( bool* isInsertedFlag, SOURCE_TYPE&& value); ---- [.small]#xref:BloombergLP/bslstl/HashTable/insertIfMissing-005.adoc[_» more..._]# == Return Value * address of the element whose key is equivalent to `key` * address of the (possibly newly inserted) element with an equivalent key == Parameters [cols="1,4"] |=== | Name| Description | *key* | movable key used to find or insert an element | *isInsertedFlag* | set to `true` if a new entry was inserted | *value* | movable value to insert if missing |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#