Hi Daniel, Daniel Walker wrote:
Nathan Crookston wrote:
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?
Yes, I intended (and still intend) to create a version which will did not automatically use the decltype fallback on g++ < 4.7 and VC10-11, but was accessible via a macro. I admit, I still disagree that making the user opt in just because it's not standardized is the best course of action -- we know there are a number of users like Joel that would like their lambdas to 'just work.' Users that want strict TR1, even if it produces results that are incorrect for the actual functors used (void return type for all nullary functors that don't just use result_type) seem unlikely to exist in the wild. I'd be more comfortable asking such users to define the USE_TR1 macro. However, I'll try to find time tomorrow, since I think providing the option is better than the current situation of 'decltype or nothing' (for lambdas) on those platforms. Thanks, Nate