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.
Variant3();
Create a variant by moving from original.
Variant3(bslmf::MovableRef<Variant3> original);
Create a variant from valueOrAllocator.
template<class TYPE_OR_ALLOCATOR>
explicit
Variant3(TYPE_OR_ALLOCATOR const& valueOrAllocator);
Create a variant by moving from the specified value.
template<class TYPE>
explicit
Variant3(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>
Variant3(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.
Variant3(
bslmf::MovableRef<Variant3> original,
bslma::Allocator* basicAllocator);
Create a variant with the type and value of original.
Variant3(
Variant3 const& original,
bslma::Allocator* basicAllocator = 0);
Create a variant holding value using basicAllocator.
template<class TYPE>
Variant3(
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 |
value |
value assigned to or stored in this variant |
basicAllocator |
allocator used to supply memory |
Created with MrDocs