...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::proto::is_proto_expr — Empty type to be used as a dummy template parameter of POD expression wrappers. It allows argument-dependent lookup to find Proto's operator overloads.
// In header: <boost/proto/extends.hpp> struct is_proto_expr { };
proto::is_proto_expr
allows argument-dependent lookup to find Proto's operator overloads. For example:
template<typename T, typename Dummy = proto::is_proto_expr> struct my_terminal { BOOST_PROTO_BASIC_EXTENDS( typename proto::terminal<T>::type , my_terminal<T> , proto::default_domain ) }; // ... my_terminal<int> _1, _2; _1 + _2; // OK, uses proto::operator+
Without the second Dummy
template parameter, Proto's operator overloads
would not be considered by name lookup.