Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2007-06-01 17:56:29

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:



Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at