[#absl-StatusOr-emplace-08]
= xref:absl.adoc[absl]::xref:absl/StatusOr.adoc[StatusOr]::emplace
:relfileprefix: ../../
:mrdocs:

`emplace` overloads

== Synopses

Declared in `&lt;absl&sol;status&sol;statusor&period;h&gt;`

Reconstructs the held value in&hyphen;place from the given arguments&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename&period;&period;&period; Args&gt;
T&
xref:absl/StatusOr/emplace-01e1.adoc[emplace](Args&&&period;&period;&period; args);
----

[.small]#xref:absl/StatusOr/emplace-01e1.adoc[_» more&period;&period;&period;_]#

Reconstructs the held value in&hyphen;place from an initializer list and args&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename U,
    typename&period;&period;&period; Args&gt;
requires std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;
                                 T, std&colon;&colon;initializer&lowbar;list&lt;U&gt;&amp;, Args&amp;&amp;&period;&period;&period;&gt;
T&
xref:absl/StatusOr/emplace-01e4.adoc[emplace](
    std::initializer&lowbar;list&lt;U&gt; ilist,
    Args&&&period;&period;&period; args);
----

[.small]#xref:absl/StatusOr/emplace-01e4.adoc[_» more&period;&period;&period;_]#

== Return Value

A reference to the reconstructed value&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *args*
| The arguments forwarded to the `T` constructor&period;
| *ilist*
| The initializer list forwarded to the `T` constructor&period;
|===


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