#include <variant.hpp>


The value is stored in a local buffer directly within the object and may be accessed by a typesafe visitation.
| TYPES | collection of possible types to be stored in this variant object | |
| Access | policy how to access the stored value |
Definition at line 229 of file variant.hpp.
Public Member Functions | |
| template<typename TAR> | |
| TAR | get () |
| retrieve current content of the variant, trying to cast or convert it to the given type. | |
| template<typename SRC> | |
| Variant & | operator= (SRC src) |
| store a copy of the given argument within the variant holder buffer, thereby typically casting or converting the given source type to the best suited (base) type (out of the collection of possible types for this Variant instance) | |
| void | reset () |
Private Types | |
| typedef Holder::Deleter | Deleter |
| typedef variant::Holder< TYPES > | Holder |
Private Attributes | |
| Holder::Storage | holder_ |
| storage: buffer holding either and "empty" marker, or one of the configured pointer to wrapper types | |
| TAR lumiera::Variant< TYPES, Access >::get | ( | ) | [inline] |
retrieve current content of the variant, trying to cast or convert it to the given type.
Actually, the function access(T&) on the Access-policy (template param) is invoked with the type currently stored in the holder buffer. May return NULL if conversion fails.
Definition at line 269 of file variant.hpp.
| Variant& lumiera::Variant< TYPES, Access >::operator= | ( | SRC | src | ) | [inline] |
store a copy of the given argument within the variant holder buffer, thereby typically casting or converting the given source type to the best suited (base) type (out of the collection of possible types for this Variant instance)
Definition at line 253 of file variant.hpp.
Holder::Storage lumiera::Variant< TYPES, Access >::holder_ [private] |
storage: buffer holding either and "empty" marker, or one of the configured pointer to wrapper types
Definition at line 239 of file variant.hpp.
1.5.6