On 4/23/2010 2:58 PM, Olaf Peter wrote:
Your operator()s are wrong (C++ error, unrelated to phoenix). Try this:
#if WANT_TO_HAVE template
struct result { typedef vector_type type; }; vector_type operator()( const vector_type& v, rlc ) const { return fusion::as_nview<0, 1, 2>( v ); }
vector_type operator()( const vector_type& v, lcr ) const { return fusion::as_nview<2, 0, 1>( v ); }
#else
This fails to compile as well:
Olaf, I recommended writing the code above (see the operator() is *not* a template. Why do you still insist on writing it as a template? Here is your problem: template <typename T> vector_type operator()( const vector_type& v, rlc ) const { return fusion::as_nview<0, 1, 2>( v ); } template <typename T> vector_type operator()( const vector_type& v, lcr ) const { return fusion::as_nview<2, 0, 1>( v ); } because you don't have any arguments with T. Regards -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon