
1 Jun
2007
1 Jun
'07
9:56 p.m.
Larry Evans wrote:
for(long ichild=0; ichild<Arity; ++ichild) { proto::eval(proto::arg_c<Expr,ichild>(expr), *this); }
That's really not going to work. If you #include proto/fusion.hpp, you can use fusion::for_each on the children nodes as follows: fusion::for_each( proto::children_of(expr), myfunc() );
template<long Index> void operator()(mpl::integral_c<long,Index>&) {
proto::eval(proto::arg_c<Expr,Index>(my_parent),my_context);
And yours is another way to skin the cat, but this line needs to be: proto::eval(proto::arg_c<Index>(my_parent),my_context); HTH, -- Eric Niebler Boost Consulting www.boost-consulting.com