[#beman-optional-make_optional-0f] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::make_optional :relfileprefix: ../../ :mrdocs: Creates an optional<T> constructing the value in‐place from an initializer list and arguments. == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename U, typename... Args> constexpr xref:beman/optional/optional-03.adoc[optional<T>] make_optional( std::initializer_list<U> il, Args&&... args) noexcept(/* see-below */) requires std::is_constructible_v<T, std::initializer_list<U>&, Args...>; ---- == Exception specification This function is potentially-throwing unless `std::is_nothrow_constructible_v<T, std::initializer_list<U> &, Args...>`. == Return Value An engaged optional<T> holding the in‐place constructed value. == Parameters [cols="1,4"] |=== | Name| Description | *il* | The initializer list forwarded to the constructor of `T.` | *args* | The additional arguments forwarded to the constructor of `T.` |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#