Subject: Re: [proto] Thoughts on traversing proto expressions and reusing grammar
From: Eric Niebler (eric_at_[hidden])
Date: 2010-10-12 16:37:06
On 10/12/2010 1:24 PM, Eric Niebler wrote:
> So it really seems to me that transform_expr is not necessary, but I may
> be wrong.
I just confirmed this by trivially replacing uses of transform_expr with
appropriate uses of nary_expr in your phoenix_test.cpp (attached).
The only difference is the type of the last expression. Since
pass_through transform leaves terminals alone, _1 ends up stored by
reference in the transformed expression, which is perfectly OK and saves
copies (admittedly trivial in this case).
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Proto list run by eric at boostpro.com