[#bsl-optional-072-2constructor-080] = 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.value()` moved and converted to `t_TYPE` otherwise. Use the allocator from `original` to supply memory if `t_ANY_TYPE` is a non‐const version of `t_TYPE`; otherwise, use the currently installed default allocator. `original` is left in a valid but unspecified state. Note that this constructor participates in overload resolution only when `t_TYPE` is constructible from an xvalue of `t_ANY_TYPE`, and is implicit only when an xvalue of `t_ANY_TYPE` is implicitly convertible to `t_TYPE`. This constructor can be called in constant expressions only when neither `t_TYPE` nor `t_ANY_TYPE` is allocator‐aware. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ANY_TYPE> constexpr optional(xref:BloombergLP/bslmf/MovableRef_Deduced.adoc[BloombergLP::bslmf::MovableRef_Deduced<optional<t_ANY_TYPE>>] original); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#