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

Explicitly create an `optional` from the specified `std&colon;&colon;optional` `original` using the specified `allocator`&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;
explicit
optional(
    std::allocator&lowbar;arg&lowbar;t allocatorArg,
    xref:bsl/optional-072.adoc[AllocType] allocator,
    std::optional&lt;t&lowbar;ANY&lowbar;TYPE&gt; const& original);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *allocatorArg*
| tag selecting the allocator&hyphen;extended constructor
| *allocator*
| allocator used to supply memory
| *original*
| source optional used to initialize this object
|===


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