Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2008-07-02 14:22:33


David Abrahams wrote:
> Eric Niebler wrote:
>> The Phoenix/Proto port in (Phoenix v3) uses BOOST_TYPEOF to deduce the
>> the type of expressions involving operators, with the exception of the
>> function call operator. For the function call operator, Phoenix v3 uses
>> result_of to calculate the return type.
>
> Interesting. Kinda makes sense, but could you explain the rationale anyway?

You mean, the rationale for using result_of instead of BOOST_TYPEOF for
the function call operator? BOOST_TYPEOF can't perfectly distinguish
between lvalues and rvalues. I fudge it where I have to, but with
function calls no fudging is necessary because result_of presumably
gives the right answer.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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