[#BloombergLP-bslstl-Variant_Base-2constructor-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_Base.adoc[Variant_Base]::Variant_Base :relfileprefix: ../../../ :mrdocs: Create a `Variant_Base` object holding the alternative with index (template parameter) `t_INDEX`, direct‐initialized from the specified `args`. == Synopsis Declared in `<bslstl_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< size_t t_INDEX, class... t_ARGS> explicit Variant_Base( std::allocator_arg_t allocatorArg, xref:BloombergLP/bslstl/Variant_Base/allocator_type.adoc[allocator_type] allocator, bsl::in_place_index_t<t_INDEX> inPlaceIndex, t_ARGS&&... args); ---- == Description Create a `Variant_Base` object holding the alternative with index (template parameter) `t_INDEX`, direct‐initialized from the specified `args`. If this `Variant_Base` is allocator‐aware, the specified `allocator` is used to supply memory. == Parameters [cols="1,4"] |=== | Name| Description | *allocatorArg* | tag selecting the allocator‐extended overload | *allocator* | allocator used to supply memory | *inPlaceIndex* | tag selecting the in‐place‐index constructor | *args* | arguments forwarded to the alternative's constructor |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#