
9 Jun
2010
9 Jun
'10
1:41 p.m.
Eric Niebler wrote:
You typically don't inherit from Proto's expression types; you use proto::extends or BOOST_PROTO_(BASIC_)EXTENDS. And if you do that, then the Proto expression you're extending is just a tuple data member that holds the child nodes. It doesn't need any fancy member functions.
Yeah, thongue slipped
If you're using proto::extends or BOOST_PROTO_EXTENDS (or BOOST_PROTO_BASIC_EXTENDS with BOOST_PROTO_EXTENDS_ASSIGN), then you'll have the right overloaded assignment operator regardless of whether you're extending expr or basic_expr OK so I just continue doing w/e I am doing at the moment.