[#absl-StatusOr-2constructor-07] = xref:absl.adoc[absl]::xref:absl/StatusOr.adoc[StatusOr]::StatusOr :relfileprefix: ../../ :mrdocs: Constructs the inner value `T` by direct‐initialization from `u`. == Synopsis Declared in `<absl/status/statusor.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename U = T> requires internal_statusor::IsConstructionValid< false, T, U, false>::value StatusOr(U&& u); ---- == Description Constructs the inner value `T` in‐place using the provided args, using the `T(U)` (direct‐initialization) constructor. This constructor is only valid if `T` can be constructed from a `U`. Can accept move or copy constructors. This constructor is explicit if `U` is not convertible to `T`. To avoid ambiguity, this constructor is disabled if `U` is a `StatusOr<J>`, where `J` is convertible to `T`. == Parameters [cols="1,4"] |=== | Name| Description | *u* | The value used to direct‐initialize the held object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#