Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/variant-o.hpp"
internal helper used to build a variant storage wrapper.
Parametrised with a collection of types, it provides functionality to copy a value of one of these types into an internal buffer, while remembering which of these types was used to place this copy. The value can be later on extracted using a visitation like mechanism, which takes a functor class and invokes a function access(T&)
with the type matching the current value in storage
Definition at line 71 of file variant-o.hpp.
Public Types | |
enum | { TYPECNT = count<TYPES>::value, SIZE = maxSize<TYPES>::value } |
typedef InstantiateWithIndex< TYPES, PlacementAdapter, Buffer > | Storage |
Static Public Member Functions | |
template<class FUNCTOR > | |
static FUNCTOR::Ret | access (Buffer &buf) |
access the variant's inline buffer, using the configured access functor. More... | |
Classes | |
struct | Buffer |
Storage to hold the actual value. More... | |
struct | CasePrepare |
initialise the dispatcher (trampoline) for the case of accessing type T More... | |
struct | CaseSelect |
provide a dispatcher table based visitation mechanism More... | |
struct | Deleter |
struct | PlacementAdapter |
|
inlinestatic |
access the variant's inline buffer, using the configured access functor.
Definition at line 181 of file variant-o.hpp.