[#BloombergLP-bdlc-HashTable-insert-05]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/HashTable.adoc[HashTable]::insert
:relfileprefix: ../../../
:mrdocs:

`insert` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;hashtable&period;h&gt;`

Insert an element with the specified `key` into this object&semi; load a handle to the new element into the specified `handle`&period; Return true if successful, and false otherwise&period; The behavior is undefined unless `key` does not evaluate to a &quot;null&quot; or &quot;removed&quot; bucket, as defined by the parameterized `TRAITS` (see the component&hyphen;level documentation for more details)&period; Note that this method will fail to compile unless the `VALUE` parameter is `bslmf&colon;&colon;Nil`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:BloombergLP/bdlc/HashTable/insert-00.adoc[insert](
    xref:BloombergLP/bdlc/HashTable/Handle.adoc[Handle]* handle,
    KEY const& key);
----

[.small]#xref:BloombergLP/bdlc/HashTable/insert-00.adoc[_» more&period;&period;&period;_]#

Insert an element with the specified `key` and the specified `value` into this object&semi; load a handle to the new element into the specified `handle`&period; Return true if successful, and false otherwise&period; The behavior is undefined unless `key` and `value` do not evaluate to a &quot;null&quot; or &quot;removed&quot; bucket, as defined by the parameterized `TRAITS` (see the component&hyphen;level documentation for more details)&period; This method will fail to compile unless the `VALUE` parameter is not `bslmf&colon;&colon;Nil`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
xref:BloombergLP/bdlc/HashTable/insert-0c.adoc[insert](
    xref:BloombergLP/bdlc/HashTable/Handle.adoc[Handle]* handle,
    KEY const& key,
    VALUE const& value);
----

[.small]#xref:BloombergLP/bdlc/HashTable/insert-0c.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
