
Thanks a lot for your reply.
"Eric" == Eric Niebler <eric@boostpro.com> writes:
Eric> Mail Delivery System wrote: >> I need a transform property_b that evaluates another transform >> property_a and returns what property_a returns+1. Simple enough, >> here's what I do: >> >> struct property_a : proto::or_< proto::when< proto::terminal<_>, >> mpl::int_<42>()> > {}; >> >> struct property_b : proto::or_ < proto::when< _, >> mpl::next<property_a(_) >() > > {}; Eric> proto::or_ in these two is unnecessary. For that matter, so is Eric> "(_)" in property_b. the proto::or_ is because I wanted to change as little as possible from my real code. The (_) is one of my many attempts to make this thing compile. I'll gladly take it out. Eric> struct actual_width_transform : proto::when<_, Eric> mpl::next<left_bound_transform>()> {}; Yep, this was it. Don't know when I dropped the when<> part in my attempts to that transform... Eric> You also appear to have gotten your terminology mixed up, and Eric> I think that's contributing to your confusion. You're calling Eric> these things "_transform", but they're actually grammars with Eric> nested transforms. ...it is the way I think of them. For me a grammar with embedded whens and transforms is a transform itself in the sense that you can evaluate grammar () (expression) and you get the corresponding transformed expression. But I see what you mean. Eric> Hope that clears things up. It does. Thanks Maurizio --