[#BloombergLP-ball-CategoryManager_RadixTree-emplace]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/CategoryManager_RadixTree.adoc[CategoryManager&lowbar;RadixTree]::emplace
:relfileprefix: ../../../
:mrdocs:

Insert an entry with the specified `key` and a newly constructed value&period;

== Synopsis

Declared in `&lt;ball&lowbar;categorymanager&lowbar;radixtree&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; Args&gt;
xref:BloombergLP/ball/CategoryManager_RadixTree/EmplaceResult.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;VALUE&gt;::EmplaceResult]
emplace(
    std::string&lowbar;view const& key,
    Args&&&period;&period;&period; args);
----

== Description

Insert into this tree an entry with the specified `key` and a newly created `t&lowbar;VALUE` object, constructed by forwarding `get&lowbar;allocator()` (if required) and the specified (variable number of) `args` to the corresponding constructor of `t&lowbar;VALUE`&period; Return a pair consisting of a reference to the value associated with `key` (whether newly inserted or already existing) and a boolean indicating whether insertion took place (`true` if the key was not already present, `false` otherwise)&period; This method requires that `t&lowbar;VALUE` be `emplace&hyphen;constructible` from `args`&period;

== Return Value

pair of a reference to the value and whether insertion occurred

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| key of the entry to insert
| *args*
| constructor arguments forwarded to `t&lowbar;VALUE`
|===


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