[#beman-optional-optional-06-2constructor-0a4]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-06.adoc[optional&lt;T&&gt;]::optional
:relfileprefix: ../../../
:mrdocs:

Constructs an optional from a U, but deletes the constructor if

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class U&gt;
requires (std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;T&amp;, U&gt; &amp;&amp; !(std&colon;&colon;is&lowbar;same&lowbar;v&lt;std&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;U&gt;, in&lowbar;place&lowbar;t&gt;) &amp;&amp;
                  !(std&colon;&colon;is&lowbar;same&lowbar;v&lt;std&colon;&colon;remove&lowbar;cvref&lowbar;t&lt;U&gt;, optional&gt;) &amp;&amp;
                  detail&colon;&colon;reference&lowbar;constructs&lowbar;from&lowbar;temporary&lowbar;v&lt;T&amp;, U&gt;)
constexpr
optional(U&& u) = delete;
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *u*
| The object to move construct from
|===


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