common/variant.hpp File Reference


Detailed Description

This file defines a simple alternative to boost::variant.

It pulls in fewer headers and has a shorter code path, but also doesn't deal with alignement issues and is not threadsafe.

Values can be stored using operator= . In order to access the value stored in lumiera::Variant, you additionally need to define a "functor"

See also:
wrapperptr.hpp usage example

Definition in file variant.hpp.

#include "common/meta/typelistutil.hpp"
#include "common/meta/generator.hpp"
#include <boost/noncopyable.hpp>

Include dependency graph for variant.hpp:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  lumiera
namespace  lumiera::variant

Classes

struct  lumiera::variant::Holder< TYPES >
 internal helper used to build a variant storage wrapper. More...
struct  lumiera::variant::Holder< TYPES >::Buffer
 Storage to hold the actual value. More...
struct  lumiera::variant::Holder< TYPES >::CasePrepare< T, BASE, i >
struct  lumiera::variant::Holder< TYPES >::CaseSelect< FUNCTOR >
 provide a dispatcher table based visitation mechanism More...
struct  lumiera::variant::Holder< TYPES >::Deleter
struct  lumiera::variant::Holder< TYPES >::PlacementAdapter< T, BASE, idx >
class  lumiera::Variant< TYPES, Access >
 A variant wrapper (typesafe union) capable of holding a value of any of a bounded collection of types. More...


Generated on Fri Nov 7 22:15:12 2008 for Lumiera by  doxygen 1.5.6