Constructors

Synopses

Declared in <bdlb_variant.h>

Create a VariantImp_AllocatorBase with the specified type and basicAllocator.

VariantImp_AllocatorBase(
    int type,
    bslma::Allocator* basicAllocator);

Create an allocator‐aware base with the given type index.

VariantImp_AllocatorBase(
    int type,
    bslma::Allocator* basicAllocator,
    bsl::true_type tag);

Create a VariantImp_AllocatorBase with the specified type and default‐constructed TYPE.

template<class TYPE>
VariantImp_AllocatorBase(
    int type,
    TYPE const& value,
    bsl::false_type tag);

Parameters

Name

Description

type

type index of the initially held alternative

basicAllocator

allocator used to supply memory

tag

unused overload‐resolution tag

value

value assigned to or stored in this variant

Created with MrDocs