
Here's a little extra feedback that I forgot include in my first reply. christophe henry wrote:
These terminals are used with a simple grammar: struct BuildGuards : proto::or_< proto::when< proto::logical_or<BuildGuards,BuildGuards >,
GuardOR<BuildGuards(proto::_left),BuildGuards(proto::_right)>() >, proto::when< proto::logical_and<BuildGuards,BuildGuards >,
GuardAND<BuildGuards(proto::_left),BuildGuards(proto::_right)>() >, proto::when< proto::logical_not<BuildGuards >, GuardNOT<BuildGuards(proto::_value)>()
Use proto::_child instead of proto::_value here. proto::_value returns the value of a terminal node. proto::_child returns the child of a unary expression tree node. It's really just luck that this is working for you.
>, proto::when < proto::terminal<guard_tag>, proto::_()
I would use proto::_ here instead of proto::_(). They mean the same thing, but proto::_ is more idiomatic. See the following section for an explanation of why proto::_ and proto::_() are equivalent when used as transforms: http://www.boost.org/doc/libs/1_39_0/doc/html/proto/users_guide.html#boost_p... -- Eric Niebler BoostPro Computing http://www.boostpro.com