Boost logo

Boost :

Subject: Re: [boost] [result_of] Allow result_of to work with C++11 lambdas
From: Daniel Walker (daniel.j.walker_at_[hidden])
Date: 2013-04-20 16:21:44


On Apr 18, 2013, at 11:53 PM, Nathan Crookston <nathan.crookston_at_[hidden]> wrote:

> Hi all,
>
> Nathan Crookston wrote:
>
>>
>> Nathan Crookston wrote:
>>
>>> Agreed. Hopefully I didn't take the discussion too far afield. The
>>> proposal is what you describe, and I believe the main impetus to accept it
>>> is so C++11 lambdas can be used in result_of expressions on compilers which
>>> have lacking lambdas.
>>>
>> Ugh. I meant "lacking decltype implementations."
>>
>
> I just wanted to ping on this; see if someone's had time to review the
> patch. I failed to mention that the same parts of the full test suite
> passes on VC10 before and after the patch, so there's some assurance that
> it's correct.

OK, I finally had a chance to look at the patch. The implementation is fine, but the configuration, documentation and tests allow/imply that BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK is enabled by default on certain compilers. I believe we should not stealthily change the default behavior. It seems to me that the migration path we adopted years ago should remain in place: the default behavior of boost:result_of will only change if your compile supports N3276, in which case you will get the full decltype implementation.

I think it would be best to introduce this functionality as a third option; i.e. one that the user opts into by explicitly defining BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK. (That's a good name for the macro, BTW.) If you could update the patch, I'd be glad to apply it.

- Daniel


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