[#BloombergLP-bslstl-Variant_Union-0d-2constructor-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_Union-0d.adoc[Variant_Union<t_HEAD, t_TAIL...>]::Variant_Union :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<bslstl_variant.h>` Create a `Variant_Union` object having no active alternative. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bslstl/Variant_Union-0d/2constructor-00.adoc[Variant_Union]() = default; ---- [.small]#xref:BloombergLP/bslstl/Variant_Union-0d/2constructor-00.adoc[_» more..._]# Create a `Variant_Union` object holding an object of type `t_HEAD` direct‐initialized from the specified `args`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... t_ARGS> xref:BloombergLP/bslstl/Variant_Union-0d/2constructor-0c.adoc[Variant_Union]( bsl::in_place_index_t<0>, t_ARGS&&... args); ---- [.small]#xref:BloombergLP/bslstl/Variant_Union-0d/2constructor-0c.adoc[_» more..._]# Create a `Variant_Union` object holding the alternative at index (template parameter) `t_INDEX` in (template parameters) 't_HEAD, t_TAIL...`, direct‐initialized from the specified `args'. Note that `t_INDEX` is not necessarily the absolute index of the desired alternative in the `bsl::variant` object. We use the tag to "unravel" the union until we get to the desired alternative type. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< size_t t_INDEX, class... t_ARGS> xref:BloombergLP/bslstl/Variant_Union-0d/2constructor-07.adoc[Variant_Union]( bsl::in_place_index_t<t_INDEX>, t_ARGS&&... args); ---- [.small]#xref:BloombergLP/bslstl/Variant_Union-0d/2constructor-07.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#