Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2012-09-15 21:24:47

On Sep 3, 2012, at 3:08 PM, eric_at_[hidden] wrote:

> This looks good, thanks Daniel. Suggestions; don't say the TR1 protocol is "no longer required." It *is* required if you want your function objects to be portable to older compilers. I also don't know what you mean by "necessitates new behaviors". By or from whom? By and large, if people have been doing it right all along, they should be ok.
> We might also point out that the idiom of specializing boost::result_of to get the right answer for nullary function objects is no longer required, and should be conditioned on BOOST_RESULT_OF_USE_DECLTYPE.

Thanks for the feedback. I incorporated this into a new section of the result_of documentation for known differences between decltype-based result_of and the TR1 protocol. The release notes could now simply refer readers to this section for more info. Something like..


On compilers that adequately implement C++11 decltype (clang 3.1, Visual C++ 11), boost::result_of now uses decltype by default rather than following the TR1 result_of protocol. We anticipate that most users will not notice a change. However, in some situations migrating from the TR1 protocol to decltype may cause breaking changes. Users can force boost::result_of to continue to follow the TR1 protocol by defining BOOST_RESULT_OF_USE_TR1. For more information about differences between decltype-based result_of and the TR1 protocol see the documentation at

- Daniel

Boost list run by bdawes at, gregod at, cpdaniel at, john at