[#bsl-optional-072-2constructor-035]
= xref:bsl.adoc[bsl]::xref:bsl/optional-072.adoc[optional]::optional
:relfileprefix: ../../
:mrdocs:

Create a disengaged `optional` object if the specified `original` object is disengaged, and an `optional` object with the value of `original&period;value()` converted to `t&lowbar;TYPE` otherwise&period; Use the currently installed default allocator to supply memory&period; Note that this constructor participates in overload resolution only when `t&lowbar;TYPE` is constructible from an lvalue of `const t&lowbar;ANY&lowbar;TYPE`, and is implicit only when an lvalue of `const t&lowbar;ANY&lowbar;TYPE` is implicitly convertible to `t&lowbar;TYPE`&period; This constructor can be called in constant expressions only when `t&lowbar;TYPE` is not allocator&hyphen;aware&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;optional&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;ANY&lowbar;TYPE&gt;
constexpr
optional(std::optional&lt;t&lowbar;ANY&lowbar;TYPE&gt; const& original);
----


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