![]() |
Home | Libraries | People | FAQ | More |
BOOST_PROTO_DEFINE_OPERATORS — Defines a complete set of expression template-building operator overloads for use with non-Proto terminal types.
// In header: <boost/proto/operators.hpp>
BOOST_PROTO_DEFINE_OPERATORS(Trait, Domain)
With BOOST_PROTO_DEFINE_OPERATORS()
, it is possible to
non-intrusively adapt an existing (non-Proto) type to be a Proto terminal.
Trait
is the name of a unary Boolean metafunction that returns
true for any types you would like to treat as Proto terminals.
Domain
is the name of the Proto domain associated with
these new Proto terminals. You may use
proto::default_domain
for the Domain
if you do not wish to associate these terminals
with any domain.
Example:
BOOST_PROTO_DEFINE_OPERATORS(