[#bsl-variant-2constructor-07fa] = xref:bsl.adoc[bsl]::xref:bsl/variant.adoc[variant]::variant :relfileprefix: ../../ :mrdocs: Create a `variant` object holding the alternative with index (template parameter) `t_INDEX`, direct‐initialized from the specified `args`. If this `variant` is allocator‐aware, the specified `allocator` is used to supply memory. This constructor participates in overload resolution only if `t_INDEX` is a valid alternative index and the designated alternative is constructible from `args`. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< std::size_t t_INDEX, class... t_ARGS> requires (t_INDEX < 1 + sizeof...(t_TAIL)) && std::is_constructible<BSLSTL_VARIANT_TYPE_AT_INDEX(t_INDEX), t_ARGS...>::value explicit variant( std::allocator_arg_t, xref:bsl/variant/allocator_type.adoc[allocator_type] allocator, bsl::in_place_index_t<t_INDEX>, t_ARGS&&... args); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#