[#absl-make_optional-07] = xref:absl.adoc[absl]::make_optional :relfileprefix: ../ :mrdocs: Creates an `optional<T>` from an initializer list and extra arguments. == Synopsis Declared in `<absl/types/optional.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename T, typename U, typename... Args> constexpr decltype(std::make_optional<T>( std::declval<std::initializer_list<U>>(), std::declval<Args>()...)) make_optional( std::initializer_list<U> il, Args&&... args); ---- == Return Value An optional holding the constructed value. == Parameters [cols="1,4"] |=== | Name| Description | *il* | Initializer list forwarded to the constructor of `T`. | *args* | Additional arguments forwarded to the constructor of `T`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#