
On Wednesday, January 25, 2012 08:42:13 Joel de Guzman wrote:
On 1/25/2012 12:30 AM, Eric Niebler wrote:
Proto doesn't force you to use inheritance to extend and expression with additional member (see BOOST_PROTO_EXTENDS). But Phoenix may, I don't know. Thomas?
AFAIU it's the same basic design as Phoenix-2. There is still an actor base class. But there should be a way to use bare proto terminals and have them taken in using as_actor.
I think I managed to do this as Eric suggested: template< typename DescriptorT, typename ExprT = phoenix::actor< attribute_terminal< DescriptorT > > > struct attribute_keyword { BOOST_PROTO_EXTENDS(ExprT, attribute_keyword, phoenix::phoenix_domain) }; This way the keyword infects the expression as expected. What about as_actor? How do I use it?