Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Eric Niebler (eric_at_[hidden])
Date: 2012-09-03 00:50:56


On 9/2/2012 9:07 PM, Joel de Guzman wrote:
> TBH, I am not following this thread closely so I am not intimate with
> issues. Could anyone point me to some documentation that will bring
> me up to speed please?

Just check the result_of docs:

http://www.boost.org/doc/libs/1_51_0/libs/utility/utility.htm#result_of

"In a future release, BOOST_RESULT_OF_USE_DECLTYPE may be enabled by
default on compilers that support decltype, so if you use the above
[TR1] protocol please take care to ensure that the result_type and
result<> members accurately represent the result type."

That future release is 1.52. The nested result_type and result<>
templates will now be ignored on modern compilers. Instead,
boost::result_of uses decltype to deduce the return type of operator()
directly.

I should also say that it has *always* been the case that the nested
result_type and result<> templates have been required to accurately
report operator()'s return type. Function objects that flout this rule
are buggy and always have been. This is nothing new.

-- 
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