[#bsl-make_optional-06]
= xref:bsl.adoc[bsl]::make&lowbar;optional
:relfileprefix: ../
:mrdocs:

Return an `optional` object containing a `t&lowbar;TYPE` object created by invoking a `bsl&colon;&colon;optional` allocator&hyphen;extended `in&lowbar;place&lowbar;t` constructor with the specified `alloc` as the allocator argument, and specified `il` and `args` as the constructor arguments&period; Note that this function will fail to compile if `t&lowbar;TYPE` doesn&apos;t use allocators&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;INIT&lowbar;LIST&lowbar;TYPE,
    class&period;&period;&period; t&lowbar;ARGS&gt;
xref:bsl/optional-072.adoc[bsl::optional&lt;t&lowbar;TYPE&gt;]
make&lowbar;optional(
    std::allocator&lowbar;arg&lowbar;t,
    bsl::optional&lt;t&lowbar;TYPE&gt;::allocator&lowbar;type const& alloc,
    std::initializer&lowbar;list&lt;t&lowbar;INIT&lowbar;LIST&lowbar;TYPE&gt; il,
    t&lowbar;ARGS&&&period;&period;&period; args);
----


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