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:27:35


<eric_at_[hidden]> wrote:
> 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.

And another consequence of this change is that the following code breaks
with decltype-based result_of for a non-nullary function object F

    template <typename F>
    struct FuncWrapper
    {
        typename boost::result_of<F()>::type operator()();

        /* ... */
    };

as described in [Part 2 of 3] of my reply to Daniel.

Regards,
Michel


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