Name |
Description |
Variant3 [constructor]
|
Constructors |
operator=
|
Assignment operators |
apply
|
apply overloads
|
applyRaw
|
applyRaw overloads
|
assign
|
assign overloads
|
assignTo
|
Assign to this object the specified value of template parameter SOURCE_TYPE converted to template parameter TYPE, and return a reference providing modifiable access to this object. The value currently held by this variant (if any) is destroyed if that value's type is not the same as TYPE. TYPE must be the same as one of the types that this variant can hold and SOURCE_TYPE must be convertible to TYPE. |
bdexStreamIn
|
DEPRECATED: Do not use. |
bdexStreamOut
|
DEPRECATED: Do not use. |
createInPlace
|
Create an instance of template parameter TYPE in this variant object with up to 14 parameters using the allocator currently held by this variant to supply memory, and return a reference providing modifiable access to the created instance. This method first destroys the current value held by this variant (even if TYPE is the same as the type currently held). TYPE must be the same as one of the types that this variant can hold. Note the order of the template arguments was chosen so that TYPE must always be specified. |
is
|
Return true if the value held by this variant object is of template parameter TYPE, and false otherwise. TYPE must be the same as one of the types that this variant can hold. Note that TYPE must be specified explicitly, e.g., myValue.is<int>(). |
isUnset
|
Return true if this variant is currently unset, and false otherwise. An unset variant does not hold a value or type. Note that this method should be preferred over checking the type index of the variant. |
maxSupportedBdexVersion
|
DEPRECATED: Do not use. |
print
|
Format this object to the specified output stream at the (absolute value of) the optionally specified indentation level, and return a reference to stream. If level is specified, optionally specify spacesPerLevel, the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). If stream is not valid on entry, this operation has no effect. Nothing is printed if this variant is unset. Each type that may be contained by this variant shall be printable with bdlb::PrintMethods (typically meaning that they either declare the bdlb::HasPrintMethod trait or provide the << output streaming operator). See {`bdlb_printmethods`}. The compiler will emit an error if bdlb::PrintMethods::print cannot be instantiated for each type that may be contained by this variant. |
reset
|
Destroy the current value held by this variant (if any), and reset this variant to the unset state. |
swap
|
Swap the value of this object with the value of the specified other object. This method provides the no‐throw guarantee if the TYPE template parameter has a no‐throw swap and the two variant objects being swapped have the same type; otherwise this method provides the basic guarantee. |
the
|
the overloads
|
typeIndex
|
Return the index in the list of TYPES corresponding to the type of the value currently held by this variant object (starting at 1), or 0 if this object is unset. Note that instead of switching code on the type index, calling apply is the preferred method of manipulating different types stored inside a variant. |
typeInfo
|
Return typeid(void). |
operator BloombergLP::bslmf::NestedTraitDeclaration<Variant3, HasPrintMethod>
|
Nested trait declaration for bdlb::HasPrintMethod. |
operator BloombergLP::bslmf::NestedTraitDeclaration<Variant3, IsBitwiseCopyable, Traits::k_VARIANT_IS_BITWISE_COPYABLE>
|
Nested trait declaration for bslmf::IsBitwiseCopyable. |
operator BloombergLP::bslmf::NestedTraitDeclaration<Variant3, IsBitwiseMoveable, Traits::k_VARIANT_IS_BITWISE_MOVEABLE>
|
Nested trait declaration for bslmf::IsBitwiseMoveable. |
operator BloombergLP::bslmf::NestedTraitDeclaration<Variant3, UsesBslmaAllocator, Traits::k_VARIANT_USES_BSLMA_ALLOCATOR>
|
Nested trait declaration for bslma::UsesBslmaAllocator. |
operator BloombergLP::bslmf::NestedTraitDeclaration<VariantImp, HasPrintMethod>
|
Nested trait declaration for bdlb::HasPrintMethod. |
operator BloombergLP::bslmf::NestedTraitDeclaration<VariantImp, IsBitwiseCopyable, Traits::k_VARIANT_IS_BITWISE_COPYABLE>
|
Nested trait declaration for bslmf::IsBitwiseCopyable. |
operator BloombergLP::bslmf::NestedTraitDeclaration<VariantImp, IsBitwiseMoveable, Traits::k_VARIANT_IS_BITWISE_MOVEABLE>
|
Nested trait declaration for bslmf::IsBitwiseMoveable. |
operator BloombergLP::bslmf::NestedTraitDeclaration<VariantImp, UsesBslmaAllocator, Traits::k_VARIANT_USES_BSLMA_ALLOCATOR>
|
Nested trait declaration for bslma::UsesBslmaAllocator. |