[#BloombergLP-bdlb-NullableAllocatedValue-emplace-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/NullableAllocatedValue.adoc[NullableAllocatedValue]::emplace
:relfileprefix: ../../../
:mrdocs:

`emplace` overloads

== Synopses

Declared in `&lt;bdlb&lowbar;nullableallocatedvalue&period;h&gt;`

Assign to this object the value of the (template parameter) `TYPE` created in place using the specified `args` and return a reference providing modifiable access to the underlying `TYPE` object&period; If this `optional` object already contains an object (&grave;true &equals;&equals; hasValue()&grave;), that object is destroyed before the new object is created&period; Note that if the constructor of `TYPE` throws an exception this object is left in a disengaged state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; ARGS&gt;
TYPE&
xref:BloombergLP/bdlb/NullableAllocatedValue/emplace-07.adoc[emplace](ARGS&&&period;&period;&period; args);
----

[.small]#xref:BloombergLP/bdlb/NullableAllocatedValue/emplace-07.adoc[_» more&period;&period;&period;_]#

Assign to this object the value of the (template parameter) `TYPE` created in place using the specified `il` and specified `args` and return a reference providing modifiable access to the underlying `TYPE` object&period; If this object already contains an object (&grave;true &equals;&equals; hasValue()&grave;), that object is destroyed before the new object is created&period; Note that if the constructor of `TYPE` throws an exception this object is left in a disengaged state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class INIT&lowbar;LIST&lowbar;TYPE,
    class&period;&period;&period; ARGS&gt;
TYPE&
xref:BloombergLP/bdlb/NullableAllocatedValue/emplace-0e.adoc[emplace](
    std::initializer&lowbar;list&lt;INIT&lowbar;LIST&lowbar;TYPE&gt; il,
    ARGS&&&period;&period;&period; args);
----

[.small]#xref:BloombergLP/bdlb/NullableAllocatedValue/emplace-0e.adoc[_» more&period;&period;&period;_]#


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