[#beman-optional-optional-03-emplace-08]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::emplace
:relfileprefix: ../../../
:mrdocs:

Constructs the value in&hyphen;place using the given arguments, destroying the current one if there

== Synopsis

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class U,
    class&period;&period;&period; Args&gt;
constexpr
T&
emplace(
    std::initializer&lowbar;list&lt;U&gt; il,
    Args&&&period;&period;&period; args);
----

== Return Value

T&amp;

== Parameters

[cols="1,4"]
|===
|Name|Description

| *il*
| The initializer list to use in emplacement construction&period;
| *args*
| The argument list to use in emplacement construction&period;
|===


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