Boost logo

Boost :

Subject: Re: [boost] [result_of] Usage guidelines
From: Michel Morin (mimomorin_at_[hidden])
Date: 2012-09-17 03:14:20


Daniel Walker wrote:
> There were many good comments and suggestions in this and the other
> thread, and I tried to incorporate them all. The new documentation is
> on trunk as of revision [80535].

This is really nice work. Thanks all!

One comment:
In C++11, a (non-static) member function can have ref-qualifiers.
Currently this feature is only supported in clang 2.9 and
later versions (in a C++11 mode). So it might not be worth
mentioning in the doc. But anyway, here is a sample code:

struct functor
{
    char& operator()() &;
    char&& operator()() &&;
};

typedef boost::result_of<
    functor&()
>::type type5; // type5 is char &

typedef boost::result_of<
    functor&&()
>::type type6; // type6 is char &&

typedef boost::result_of<
    functor()
>::type type7; // type7 is char &&

Regards,
Michel


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