[#BloombergLP-bdlb-Variant10-2constructor-08b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/Variant10.adoc[Variant10]::Variant10 :relfileprefix: ../../../ :mrdocs: Create a variant object with the specified `valueOrAllocator` that can be either a value of a type that the variant can hold or an allocator to supply memory. If `valueOrAllocator` is not a `bslma::Allocator *`, then the variant will hold the value and type of `valueOrAllocator`, and use the currently installed default allocator to supply memory. Otherwise, the variant will be unset and use `valueOrAllocator` to supply memory. `TYPE_OR_ALLOCATOR` must be the same as one of the types that this variant can hold or be convertible to `bslma::Allocator *`. Note that this parameterized constructor is defined instead of two constructors (one taking a `bslma::Allocator *` and the other not) because template parameter arguments are always a better match than derived‐to‐base conversion (a concrete allocator pointer converted to `bslma::Allocator *`). == Synopsis Declared in `<bdlb_variant.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TYPE_OR_ALLOCATOR> explicit Variant10(TYPE_OR_ALLOCATOR const& valueOrAllocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#