Constructors

Synopses

Declared in <bdlb_variant.h>

Create a variant object in the unset state that uses the currently installed default allocator to supply memory.

Create a variant by moving from original.

Create a variant from valueOrAllocator.

template<class TYPE_OR_ALLOCATOR>
explicit
Variant7(TYPE_OR_ALLOCATOR const& valueOrAllocator);

Create a variant by moving from the specified value.

template<class TYPE>
explicit
Variant7(TYPE&& value)
requires !bsl::is_same<
                      SelfType,
                      typename bsl::remove_const<
                      typename bsl::remove_reference<TYPE>::type>::type>::value
                 &&
                 !bsl::is_convertible<TYPE, bslma::Allocator *>::value;

Create a variant holding value using basicAllocator.

template<class TYPE>
Variant7(TYPE&& value)
requires !bsl::is_same<
                     SelfType,
                     typename bsl::remove_const<
                     typename bsl::remove_reference<TYPE>::type>::type>::value;

Create a variant from original using basicAllocator.

Create a variant with the type and value of original.

Variant7(
    Variant7 const& original,
    bslma::Allocator* basicAllocator = 0);

Create a variant holding value using basicAllocator.

template<class TYPE>
Variant7(
    TYPE const& value,
    bslma::Allocator* basicAllocator);

Parameters

Name

Description

original

source variant to copy or move from

valueOrAllocator

held value, or allocator if convertible to bslma::Allocator *

value

value assigned to or stored in this variant

basicAllocator

allocator used to supply memory

Created with MrDocs