I\'m trying to iterate over a boost::fusion vector using:
typedef typename fusion::result_of::begin::type t_iter;
std::cout << distance(begi
You can't just iterate a Fusion vector like that, the type for each iterator may be different than the previous one (and usually is). I guess that's why you don't have it = next(it)
in your code, it would give a compilation error.
You could use boost::fusion::for_each
for this, together with a function object that prints each element to the standard output:
struct print
{
template< typename T >
void operator()( T& v ) const
{
std::cout << v;
}
};
...
boost::fusion::for_each( t, print() );