[#BloombergLP-bslstl-Variant_Base-2constructor-0b4]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Variant_Base.adoc[Variant&lowbar;Base]::Variant&lowbar;Base
:relfileprefix: ../../../
:mrdocs:

Create a `Variant&lowbar;Base` object whose index is the specified `index` without constructing an alternative object&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;variant&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
Variant&lowbar;Base(
    std::allocator&lowbar;arg&lowbar;t allocatorArg,
    xref:BloombergLP/bslstl/Variant_Base/allocator_type.adoc[allocator&lowbar;type] allocator,
    xref:BloombergLP/bslstl/Variant_ConstructFromStdTag.adoc[Variant&lowbar;ConstructFromStdTag] fromStdTag,
    size&lowbar;t index);
----

== Description

Create a `Variant&lowbar;Base` object whose index is the specified `index` without constructing an alternative object&period; If this `Variant&lowbar;Base` is allocator&hyphen;aware, the specified `allocator` is used to supply memory&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *allocatorArg*
| tag selecting the allocator&hyphen;extended overload
| *allocator*
| allocator used to supply memory
| *fromStdTag*
| tag selecting this indexless construction overload
| *index*
| index of the alternative that will (later) be created
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
