BOOST_YAP_USER_UNARY_OPERATOR
// In header: <boost/yap/user_macros.hpp>
BOOST_YAP_USER_UNARY_OPERATOR(op_name, expr_template, result_expr_template)
Defines operator overloads for unary operator op_name that each take an expression instantiated from expr_template and return an expression instantiated from the result_expr_template expression template. One overload is defined for each of the qualifiers const &
, &
, and &&
. For the lvalue reference overloads, the argument is captured by reference into the resulting expression. For the rvalue reference overload, the argument is moved into the resulting expression.
Example:
template <boost::yap::expr_kind Kind, typename Tuple> struct user_expr { static const boost::yap::expr_kind kind = Kind; Tuple elements; }; // Operator overloads for operator!(). BOOST_YAP_USER_UNARY_OPERATOR(logical_not, user_expr, user_expr)
Parameters: |
|