
Frédéric Bron wrote:
For example: has_operator_unary_minus < class RHS, class RET=RHS > has_operator_minus_assign < class LHS, class RHS=LHS, class RET=LHS > This would take care of most of the normal use cases.
I think it is best to have the default behavior to forget about the return type. Why would you impose return type to be LHS? It is fine for +, -, ... when RHS=LHS but when you start to deal with different types, I think it just adds confusion. has_operator_plus<double, int> would then check for a return type "double" while has_operator_plus<int, double> for a return type int. You would break the symmetry of these operators.
User wanting symmetry could use common_type<LHS,RHS> in this case. But using it as default is not good idea as common_type is not always defined. So I agree to change the default behavior to don't check. Best, Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/RE-Boost-announce-Review-Boost-Type-Trait... Sent from the Boost - Dev mailing list archive at Nabble.com.