[#BloombergLP-bdlb-Variant4-2constructor-0a] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Variant4.adoc[Variant4]::Variant4 :relfileprefix: ../../../ :mrdocs: Create a variant object having the specified `value` of template parameter `TYPE` and that uses the specified `basicAllocator` to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. `TYPE` must be the same as one of the types that this variant can hold. == Synopsis Declared in `<bdlb_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE> Variant4( TYPE const& value, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#