
Jeffrey Lee Hellrung, Jr.-2 wrote:
It is implicit in the documentation, and likewise verified from looking at the implementation, that all arguments are assumed to be lvalues. That is, a reference qualifier is automatically added to the argument types given to an operator trait. Thus, the only way to query if an operator is applicable to an rvalue is to query using a const-qualified type, and even then I think you could get back false negatives in C++0x and even C++03 with Boost.Move rvalue-reference emulation (consider only operator_xxx(T&&) available). Further, rvalueness and lvalueness does enter into overload resolution (rvalues can't bind to T& when T is deduced), hence it does influence the result type of the operation. For these reasons, I believe the traits should strive to differentiate between lvalue and rvalue argument types.
Very good point. Vicente -- View this message in context: http://boost.2283326.n4.nabble.com/Review-Boost-Type-Traits-Extension-by-Fre... Sent from the Boost - Dev mailing list archive at Nabble.com.