,
Hi all,
It is probably already been discovered by everyone at this point, but
the code proposed by Andrew does not to work properly to apply
distributivity more than once in an expression [works for a*(b+c) but
not for a*(b+c*(d+c)) ]
Here a modified version that seems to work recursively.
How does it look?
struct distr :
proto::or_<
proto::when<
proto::multiplies< proto::_, proto::plus< proto::_, proto::_ > >,
proto::call
As a follow-up, the attached code seems to compile and yield the expected result.
andrew
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users