Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Type Traits Extension by Frederic Bron
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-03-18 17:39:40


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-Frederic-Bron-tp3353283p3388522.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk