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

`emplace` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; Args&gt;
constexpr
T&
xref:beman/optional/optional-03/emplace-04.adoc[emplace](Args&period;&period;&period;&&&period;&period;&period; args);
----

[.small]#xref:beman/optional/optional-03/emplace-04.adoc[_» more&period;&period;&period;_]#

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


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

[.small]#xref:beman/optional/optional-03/emplace-08.adoc[_» more&period;&period;&period;_]#

== Return Value

T&amp;


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