AMDG On 02/12/2018 06:57 PM, Zach Laine via Boost wrote:
<snip>
You could also get rid of the need for `::user_expr`
We actually want that. It's often necessary to be able to return an expression created from some template different than the template defining he operator. I could have doubled the number of functions and macros in Yap that take an expression template template parameter, providing an overload that does not take this parameter. Of course, the macros would be differently named, not overloaded (another small problem).
You don't need a separate macro: #define BOOST_YAP_USER_UNARY_OPERATOR_MEMBER(op_name, ...) \ /* implementation */
This would make it easier to write the common-case code (in which the expression template used for the return type is that same as the expression template defining the operation). I deemed that to be a bad trade-off.
In Christ, Steven Watanabe