I thing the first problem can be solved using Boost.Fusion:
// the names of the types in the application
typedef char int8;
typedef short int16;
typedef int int32;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef float float32;
typedef double float64;
// an mpl vector containing all the types
typedef boost::mpl::vector
map_type;
// the variables
map_type variables;
// use a variable
at<int8>(variables)
However, there is a lot of redundancy in the boost::fusion::map typedef. Is
there any way to obtain the boost::fusion::map typedef automatically from
the boost::mpl::vector?
I have the following related problem.
// an mpl vector containing all the size types
typedef boost::mpl::vector
boost::fusion::pair
boost::fusion::pair
map_type;
Again, I want to obtain the boost::fusion::map typedef automatically from the two boost::mpl::vectors. -- Ares Lagae Computer Graphics Research Group, Katholieke Universiteit Leuven http://www.cs.kuleuven.be/~ares/