[#bsl-optional-0b]
= xref:bsl.adoc[bsl]::xref:bsl/optional-072.adoc[optional&lt;t&lowbar;TYPE&gt;]
:relfileprefix: ../
:mrdocs:

Deduce the specified type `t&lowbar;TYPE` from the corresponding type supplied to the constructor of `optional`&period; This guide does not participate in deduction unless the deduced type `t&lowbar;TYPE` supports the bslma allocator model, and the specified `t&lowbar;ALLOC` can be implicitly converted to `bsl&colon;&colon;allocator&lt;char&gt;`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;TYPE,
    class t&lowbar;ALLOC&gt;
requires BloombergLP&colon;&colon;bslma&colon;&colon;UsesBslmaAllocator&lt;t&lowbar;TYPE&gt;&colon;&colon;value &amp;&amp; bsl&colon;&colon;is&lowbar;convertible&lowbar;v&lt;t&lowbar;ALLOC, bsl&colon;&colon;allocator&lt;char&gt;&gt;
xref:bsl/optional-072.adoc[optional&lt;t&lowbar;TYPE&gt;](
    std::allocator&lowbar;arg&lowbar;t,
    t&lowbar;ALLOC,
    t&lowbar;TYPE) -> xref:bsl/optional-072.adoc[optional&lt;t&lowbar;TYPE&gt;];
----


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