Macro BOOST_PROTO_BASIC_EXTENDSBOOST_PROTO_BASIC_EXTENDS — For creating expression wrappers that to a Proto expression template, like
SynopsisBOOST_PROTO_BASIC_EXTENDS(Expr, Derived, Domain) Description
Example: template< class Expr > struct my_expr; struct my_domain : proto::domain< proto::pod_generator< my_expr > > {}; template< class Expr > struct my_expr { // OK, this makes my_expr<> a valid Proto expression extension. // my_expr<> does /not/ have overloaded assignment, subscript, // and function call operators that build expression templates, however. BOOST_PROTO_BASIC_EXTENDS(Expr, my_expr, my_domain) }; // OK, my_expr<> is POD, so this is statically initialized: my_expr< proto::terminal<int>::type > const _1 = {{1}};
See also:
|