|
Boost : |
Subject: Re: [boost] [utility][thread] result_of - erroneous result type from a C++11 lambda
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2013-06-17 20:43:34
On Jun 17, 2013, at 4:09 PM, Nathan Crookston <nathan.crookston_at_[hidden]> wrote:
> Klaim - Joël Lamotte wrote:
>
>> Daniel Walker wrote:
>>
>>> BOOST_RESULT_OF_USE_DECLTYPE is automatically defined when
>>> BOOST_NO_CXX11_DECLTYPE_N3276 is not defined; i.e. it's only enabled by
>>> default when the compiler has fairly complete decltype support including
>>> N3276. As of Boost 1.53.0, it appears this is not the case for any
>> version
>>> of Visual Studio. (See boost/config/compiler/visualc.hpp starting at line
>>> 224 for unsupported features.) I don't know if there's been any progress
>> on
>>> that front from Microsoft, but as soon as N3276 is enabled in Boost's
>>> compiler config file, result_of will use decltype by default for that
>>> compiler.
>>>
>>
>> Would it be unrealistic to fallback on std::result_of for VS2012 versions
>> only?
>> It would fix most result_of bugs in Boost caused on this plateform.
>>
>
> The following patch will allow your use case to work, I believe:
>
> https://svn.boost.org/trac/boost/ticket/7753
>
> This has been discussed before, but I think your report is another data
> point indicating that users would prefer something that deduces correctly
> for all cases, even though it changes the deduction of a nullary function
> type from what TR1 would do.
>
Hey Nate, when we last discussed your patch I believe you said you were going to upload a new version (with appropriate documentation, etc.) that would leave in place the current default behavior of result_of. Any progress?
- Daniel
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk