Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-09-03 23:20:00


Daniel Walker wrote:
> Below is a first stab at documenting breaking changes for
> the release notes and/or result_of documentation.

Great, Daniel!
Here are some comments to the release notes and general discussions.
(My comments might be too detailed and not good for the release notes.)

[Part 1 of 3]

> BREAKING CHANGES TO BOOST RESULT_OF
>
> [...]
> The macro BOOST_RESULT_OF_USE_DECLTYPE is defined
> when result_of is using decltype. Please see the result_of
> documentation for more information.

Better to mention BOOST_RESULT_OF_USE_TR1 to force TR1-style result_of?

> 1) TR1 protocol misusage
[...]
> #ifdef BOOST_RESULT_OF_USE_DECLTYPE
[...]

Should be

    !defined(BOOST_NO_DECLTYPE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)

One can define BOOST_RESULT_OF_USE_DECLTYPE on compilers without
decltype support and, in that case, TR1-style result_of is used. This is the
behavior of the macro.

Once Eric changed this, but I claimed the regression and the change
was reverted ( http://thread.gmane.org/gmane.comp.lib.boost.devel/230401/ ).
In that thread, I might have over-emphasized the regression. If you think
the effect of the code breakage is small enough, then I think it's OK to reapply
Eric's change.

Regards,
Michel


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