
Eric Niebler wrote:
I don't have a good solution at my fingertips or the time to come up with something really whiz-bang, but you can get part of the way with the proto::lazy transform. For instance, you can handle all binary expressions with:
bp::when< bp::nary_expr< bp::_, eval_xpr, eval_xpr > , bp::lazy< functor< bp::tag_of< bp::_ > >( eval_xpr(bp::_left) , eval_xpr(bp::_right) )> >
This uses proto::make to turn functor< bp::tag_of< bp::_ > > into, e.g., function< proto::tag::plus > and then uses proto::call to invoke it.
Hope that moves you in the right direction, Aaaah bp::lazy ! I was indeed trying to find such thing like that.Maybe I can combine this with some fusion::fused or unfused somehow. I'll give this a try.
-- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35