LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
#include <generic-variant.hh>
Public Types | |
typedef generic_variant< T0_, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)> | self_type |
The type of this variant. | |
typedef boost::variant< T0_, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)> | super_type |
Super type. |
Public Member Functions | |
template<typename U > | |
self_type & | operator= (const U &) |
generic_variant () | |
template<typename U > | |
generic_variant (const U &rhs) | |
operator T0_ & () | |
Convert this variant to a value of type U. |
A wrapper over boost::variant supporting conversion operators.
Preconditions:
Proper declaration form: misc::generic_variant<types> (where types is a type-sequence) or misc::generic_variant<T0,T1,...,Tn> (where T0 is NOT a type-sequence)
typedef generic_variant<T0_, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)> misc::generic_variant< T0_, >::self_type |
The type of this variant.
typedef boost::variant<T0_, BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T)> misc::generic_variant< T0_, >::super_type |
Super type.
misc::generic_variant< T0_, >::generic_variant | ( | ) |
Constructors.
misc::generic_variant< T0_, >::generic_variant | ( | const U & | rhs | ) |
misc::generic_variant< T0_, >::operator T0_ & | ( | ) |
Convert this variant to a value of type U.
This conversion rely on boost::get. In particular, if the conversion fails, a boost::bad_get exception is thrown.
self_type& misc::generic_variant< T0_, >::operator= | ( | const U & | ) |