LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Interface of misc::generic_variant. More...
#include <boost/variant.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <misc/generic-variant.hxx>
Go to the source code of this file.
Classes | |
class | misc::generic_variant< T0_, > |
Namespaces | |
namespace | boost |
namespace | boost::detail |
namespace | boost::detail::variant |
namespace | misc |
Handling of generic, oriented or undirected, graph. |
Macros | |
#define | BOOST_VARIANT_DETAIL_DEFINE_VOID_N(z, N, _) |
#define | MISC_GENERIC_VARIANT_AUX_DECLARE_PARAMS_IMPL(z, N, T) typename BOOST_PP_CAT(T, N) = BOOST_PP_CAT(boost::detail::variant::void, N) |
#define | MISC_GENERIC_VARIANT_AUX_DECLARE_PARAMS |
#define | MISC_GENERIC_VARIANT_CONVERSION_OPERATOR_DECL(z, N, T) operator BOOST_PP_CAT(T,N) & (); |
#define | MISC_GENERIC_VARIANT_CONST_CONVERSION_OPERATOR_DECL(z, N, T) operator const BOOST_PP_CAT(T,N) & () const; |
Interface of misc::generic_variant.
misc::generic_variant is a wrapper over boost::variant that adds conversion operators to the original Boost variant class.
This class is not used in the Tiger Compiler. It has been left here as an example of wrapper around a Boost class, showing interesting (but quite delicate) features such as the Boost Preprocessor Library (a set of macros for preprocessor metaprogramming).
misc::generic_variant is used just like boost::variant, and you won't be disturbed when using it. Unfortunately, its implementation code is very difficult to read. Hence, a simpler version of this class (where the number of underlying types in the variant is fixed) is provided, misc::variant. This is the one actually used in the compiler.
#define BOOST_VARIANT_DETAIL_DEFINE_VOID_N | ( | z, | |
N, | |||
_ | |||
) |
#define MISC_GENERIC_VARIANT_AUX_DECLARE_PARAMS |
#define MISC_GENERIC_VARIANT_AUX_DECLARE_PARAMS_IMPL | ( | z, | |
N, | |||
T | |||
) | typename BOOST_PP_CAT(T, N) = BOOST_PP_CAT(boost::detail::variant::void, N) |
#define MISC_GENERIC_VARIANT_CONST_CONVERSION_OPERATOR_DECL | ( | z, | |
N, | |||
T | |||
) | operator const BOOST_PP_CAT(T,N) & () const; |
#define MISC_GENERIC_VARIANT_CONVERSION_OPERATOR_DECL | ( | z, | |
N, | |||
T | |||
) | operator BOOST_PP_CAT(T,N) & (); |
Conversion operators generators (declarations).