Joel Falcou wrote:
Joel Falcou a écrit :
I have a expression who use BOOST_PROTO_EXTEND to be used as a POD type and I have a class inheriting from this expression to build a terminal class.
... Is it a proto bug or a std bug ?
OK seems I found the error myself. I was using
bp::nary_expr< bp::_, bp::vararg
> as a rule in my_grammar, which obviously caught tag::address_of.
Is it correct for matching any nary_expr *except* address_of : bp::nary_expr< bp::not_pt::address_of, bp::vararg
> or is there a better way if I want to prevent a subset of tag to be used ?
Right, as you've discovered, Proto overloads unary operator& by default,
but you can turn it off in your domain's grammar. The grammar you
suggested won't do it, though. Try this:
proto::and_<
proto::nary_expr<_, proto::vararg
HTH, -- Eric Niebler BoostPro Computing http://www.boostpro.com