Lumiera  0.pre.03
»edit your freedom«
Variant< TYPES >::Buff< TY > Struct Template Reference

Description

template<typename TYPES>
template<typename TY>
struct lib::Variant< TYPES >::Buff< TY >

concrete inner capsule specialised for a given type

Definition at line 282 of file variant.hpp.

Public Member Functions

 Buff (TY const &obj)
 
 Buff (TY &&robj)
 
 Buff (Buff const &oBuff)
 
 Buff (Buff &&rBuff)
 
TY & access () const
 < core operation: target is contained within the inline buffer
 
void dispatch (Visitor &visitor)
 
bool dispatch (Predicate &visitor) const
 
 operator string () const
 diagnostic helper
 
void operator= (Buff const &buff)
 
void operator= (Buff &&rref)
 
void operator= (TY const &ob)
 
void operator= (TY &&rob)
 

Static Public Member Functions

static Buffdowncast (Buffer &b)
 
static string indicateTypeMismatch (Buffer &)
 error message when accessing the variant content with wrong type assumptions. More...
 

Member Function Documentation

◆ indicateTypeMismatch()

string indicateTypeMismatch ( Buffer )
inlinestatic

error message when accessing the variant content with wrong type assumptions.

Remarks
while this diagnostics can be crucial for finding bugs, we avoid including format-string.hpp, since lib::Variant is used pervasively as part of lib::diff::GenNode. Especially in development builds, we observed a tangible leverage on executable size. Thus we implement the protection against follow-up exceptions explicitly here.

Definition at line 567 of file variant.hpp.

+ Inheritance diagram for Variant< TYPES >::Buff< TY >:
+ Collaboration diagram for Variant< TYPES >::Buff< TY >:

The documentation for this struct was generated from the following file: