|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-05-30 09:53:16
The doc file:
libs/xpressive/proto/doc/html/boost_proto/user_s_guide/tree_transformations.html
contains:
Second, unary_expr< _, CalculatorGrammar >, has a default transform
associated with it. It is a pass-through transform. Given an
expression of the form expr< T, arg1< X > >, the transform will invoke
the CalculatorGrammar transform (which we haven't completely defined
yet -- patience) on X resulting in Y, and then reassemble the
expression as expr< T, arg1< Y > >.
yet unary_expr<_, CalculatorGrammar >, defined in traits.hpp, is:
template<typename Tag, typename T>
struct unary_expr
: has_pass_through_transform<unary_expr<Tag, T> >
{...};
so it isn't of the form, expr<T,arg1<X> > for any T or X. OTOH,
the nested unary_expr typedef:
typedef expr<Tag, args1<T> > type;
is of this form; so, I guess what's meant by "Given an expression of the
form.." is "Given an expression of type, E, where E::type is of the
form..."?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk