Boost logo

Boost :

Subject: Re: [boost] [result_of] now uses decltype on release branch
From: Eric Niebler (eric_at_[hidden])
Date: 2012-09-05 11:12:42

On 9/4/2012 10:32 PM, Jeffrey Lee Hellrung, Jr. wrote:
> In any case, I still think your use of result_of in the given example
> was brittle and, ultimately, a misuse, whether we're speaking of the
> TR1-based or the decltype-based result_of.


> AFAIK, result_of has never had any guarantees as far as instantiating
> it with invalid call signatures.

Correct. And in C++11, std::result_of doesn't make that guarantee
either. From Table 53 in describing the requirements of

"Fn shall be a function object type (20.8), reference to function, or
reference to function object type. The expression
decltype(declval<Fn>()(declval<ArgTypes>()...)) shall be well formed."

Joel, I know you're annoyed by this change. But in truth, you were
relying on an implementation detail of result_of. The list of gotchas in
the release notes will include this case.

Eric Niebler
BoostPro Computing

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