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

Make an optional

== Synopses

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

Make an optional


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    int = 0,
    class T&gt;
constexpr
xref:beman/optional/optional-03.adoc[optional&lt;std::decay&lowbar;t&lt;T&gt;&gt;]
xref:beman/optional/make_optional-05.adoc[make&lowbar;optional](T&& t) noexcept(std&colon;&colon;is&lowbar;nothrow&lowbar;constructible&lowbar;v&lt;optional&lt;std&colon;&colon;decay&lowbar;t&lt;T&gt;&gt;, T&gt;)
requires std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;std&colon;&colon;decay&lowbar;t&lt;T&gt;, T&gt;;
----

[.small]#xref:beman/optional/make_optional-05.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename&period;&period;&period; Args&gt;
constexpr
xref:beman/optional/optional-03.adoc[optional&lt;T&gt;]
xref:beman/optional/make_optional-00.adoc[make&lowbar;optional](Args&&&period;&period;&period; args) noexcept(std&colon;&colon;is&lowbar;nothrow&lowbar;constructible&lowbar;v&lt;T, Args&period;&period;&period;&gt;)
requires std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;T, Args&period;&period;&period;&gt;;
----

[.small]#xref:beman/optional/make_optional-00.adoc[_» more&period;&period;&period;_]#


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename U,
    typename&period;&period;&period; Args&gt;
constexpr
xref:beman/optional/optional-03.adoc[optional&lt;T&gt;]
xref:beman/optional/make_optional-0f.adoc[make&lowbar;optional](
    std::initializer&lowbar;list&lt;U&gt; il,
    Args&&&period;&period;&period; args) noexcept(std&colon;&colon;is&lowbar;nothrow&lowbar;constructible&lowbar;v&lt;T, std&colon;&colon;initializer&lowbar;list&lt;U&gt; &amp;, Args&period;&period;&period;&gt;)
requires std&colon;&colon;is&lowbar;constructible&lowbar;v&lt;T, std&colon;&colon;initializer&lowbar;list&lt;U&gt;&amp;, Args&period;&period;&period;&gt;;
----

[.small]#xref:beman/optional/make_optional-0f.adoc[_» more&period;&period;&period;_]#


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