Hi,
I started to play around with the boost fusion and mpl library and got stuck with a quite simple problem.
I declared the following types:
typedef boost::mpl::vector<char, int, long> TypeVector;
typedef boost::fusion::vector<char, int, long> FusionVector_t;
Now I wanted to write a function that gets me the value from the FusionVector.
template<size_t N typename T>
T getValue(FusionVector_t fvec)
{
return boost::fusion::at_c<N>(fvec);
}
The function works as expected but I would like to get the index from the boost::mpl vector and use it in this function and not pass it to the function as a template parameter. But I did not figure out so far how to do this.
Could someone give me a hint?