[#beman-optional-optional-03-2constructor-00]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-03.adoc[optional]::optional
:relfileprefix: ../../../
:mrdocs:

Constructs the value from `u,` forwarding it if necessary&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class U = T&gt;
constexpr
explicit(!std&colon;&colon;is&lowbar;convertible&lowbar;v&lt;U, T&gt;)
optional(U&& u)
requires detail&colon;&colon;enable&lowbar;forward&lowbar;value&lt;T, U&gt;;
----

== Description

If `u` is convertible to `T,` this is an explicit constructor&period;

Constructs the stored value with `u`&period;

== Parameters

[cols=2]
|===
| Name
| Description
| *u*
| The object to move construct from
|===


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