[#absl-StatusOr-2constructor-0c5]
= xref:absl.adoc[absl]::xref:absl/StatusOr.adoc[StatusOr]::StatusOr
:relfileprefix: ../../
:mrdocs:

Constructs a `StatusOr&lt;T&gt;` from an `absl&colon;&colon;StatusOr&lt;U&gt;`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename U&gt;
requires internal&lowbar;statusor&colon;&colon;IsConstructionFromStatusOrValid&lt;
                                false, T, U, false, const U&amp;&gt;&colon;&colon;value
StatusOr(xref:absl/StatusOr.adoc[StatusOr&lt;U&gt;] const& other);
----

== Description

Constructs a new `absl&colon;&colon;StatusOr&lt;T&gt;` from an `absl&colon;&colon;StatusOr&lt;U&gt;`, when `T` is constructible from `U`&period; To avoid ambiguity, these constructors are disabled if `T` is also constructible from `StatusOr&lt;U&gt;&period;`&period; This constructor is explicit if and only if the corresponding construction of `T` from `U` is explicit&period; (This constructor inherits its explicitness from the underlying constructor&period;)

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| The source `StatusOr&lt;U&gt;` to convert from&period;
|===


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