|
Boost : |
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2008-04-07 12:50:45
On Mon, Apr 7, 2008 at 6:19 PM, Daniel Walker <daniel.j.walker_at_[hidden]> wrote:
> On Mon, Apr 7, 2008 at 11:37 AM, Eric Niebler <eric_at_[hidden]> wrote:
> > And is there a plan in C++0x
> > to require std::result_of to be implemented in terms of decltype?
>
> Yes. There was a proposal to remove the result_type/result<> heuristic
> described in TR1 3.4/3 entirely since implementers can just use
> decltype.
>
> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2194.pdf
>
> I'm not sure if that's been accepted by the committee yet or not.
>
The last draft standard (n2588) has no mention of the result<...> protocol:
The definition of result_of simply states:
namespace std {
// undefined
template <class> class result_of;
template <class Fn, class... ArgTypes>
class result_of<Fn(ArgTypes...)> {
public :
// types
typedef see below type;
};
}
Given an rvalue fn of type Fn and values t1, t2, ..., tN of types
T1, T2, ..., TN in ArgTypes, respectively,
the type member is the result type of the expression fn(t1, t2,
...,tN). The values ti are lvalues when the
corresponding type Ti is a reference type, and rvalues otherwise.
So, yes, the result<> seems to be gone.
-- gpd
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk