[#BloombergLP-bdlb-Variant12-2constructor-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Variant12.adoc[Variant12]::Variant12
:relfileprefix: ../../../
:mrdocs:

Create a variant holding `value` using `basicAllocator`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
Variant12(
    TYPE const& value,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

== Description

If `basicAllocator` is 0, the currently installed default allocator is used&period; `TYPE` must be the same as one of the types that this variant can hold&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| value assigned to or stored in this variant
| *basicAllocator*
| allocator used to supply memory
|===


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