Boost logo

Boost :

Subject: Re: [boost] [result_of] Allow result_of to work with C++11 lambdas
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2013-04-21 03:04:37

Le 20/04/13 23:25, Nathan Crookston a écrit :
> Hi Daniel,
> Daniel Walker wrote:
>> Nathan Crookston wrote:
>>> 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
>> 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.
> Thanks for looking over the patch! I'd be happy to make the change, if
> that means getting the functionality into boost. However, I think that the
> decltype fallback should be enabled at least for those compilers which have
> both a lacking decltype implementation and C++11 lambdas. This doesn't
> change the migration path, of course -- as N3276 is implemented in more
> compilers, more compilers will use the straight (standards conforming)
> decltype implementation.
> I don't think there are typical situations where someone using lambda
> functions would *not* want boost::result_of to work for it. However, I'll
> submit a patch updated as you request in a few days, unless I and/or others
> can help change your mind. ;)
default on these compilers, result on a regression on these compilers?

If not it should be done as it allows to take care of more cases.

Do we know of some regression cases?


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