Subject: Re: [boost] [result_of] Allow result_of to work with C++11 lambdas
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2013-04-26 12:07:12
On 20/04/13 22:21, Daniel Walker wrote:
> 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.
I think it should always be enabled when using TR1 result_of, whether
decltype supports N3276 or not.
Doing just that will allow a lot of code to "just work" for many people.
Adding a third option is not very useful and is maintenance nightmare.
It's an extension, it doesn't break any code.