|
Boost : |
Subject: Re: [boost] [yap] Review
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-02-13 16:28:13
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk