[#bsl-optional-072-2constructor-06c] = xref:bsl.adoc[bsl]::xref:bsl/optional-072.adoc[optional]::optional :relfileprefix: ../../ :mrdocs: If the specified `original` contains a value, create an `optional` object whose contained value is initialized from `*original`; otherwise, create a. == Synopsis Declared in `<bslstl_optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- optional( std::allocator_arg_t allocatorArg, xref:bsl/optional-072.adoc[AllocType] allocator, xref:bsl/optional-072.adoc[optional] const& original); ---- == Description If the specified `original` contains a value, create an `optional` object whose contained value is initialized from `*original`; otherwise, create a disengaged If the specified `original` contains a value, create an `optional` object whose contained value is initialized from `*original`; otherwise, create a disengaged `optional` object. Use the specified `allocator` to supply memory. == Parameters [cols="1,4"] |=== | Name| Description | *allocatorArg* | tag selecting the allocator‐extended constructor | *allocator* | allocator used to supply memory | *original* | source optional used to initialize this object |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#