This is an archive of the discontinued LLVM Phabricator instance.

Fix PR#22600: Wrong return type for operator() of "diamond functors"
ClosedPublic

Authored by mclow.lists on Feb 24 2015, 11:01 AM.

Details

Reviewers
EricWF
Summary

Make some simple C++ code much more complicated.
As a bonus, add noexcept specifications to all the 'diamond functors'

Fixes http://llvm.org/bugs/show_bug.cgi?id=22600

Diff Detail

Event Timeline

mclow.lists retitled this revision from to Fix PR#22600: Wrong return type for operator() of "diamond functors".
mclow.lists updated this object.
mclow.lists edited the test plan for this revision. (Show Details)
mclow.lists added a reviewer: EricWF.
mclow.lists added a subscriber: Unknown Object (MLST).
EricWF edited edge metadata.Feb 24 2015, 12:16 PM

Why not just use decltype(auto)? Also these functions not SFINAE instead of being a hard compile error when they are not well formed. is that intended?

Should have read the bug report. I'll look into the SFINAE before I'm convinced that libstdc++ is correct. Do you have a strong opinion in this?

I'm convinced that our implementation is not correct (does not match what's in the standard, and the difference is detectible).

I have no opinion about libstdc++'s implementation.

include/functional
525

This is an inadvertent change.

I think the change for logical_not and bit_not are missing.

mclow.lists edited edge metadata.

Add logical_not and bit_not

EricWF accepted this revision.Feb 25 2015, 1:47 AM
EricWF edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Feb 25 2015, 1:47 AM
EricWF closed this revision.Feb 26 2015, 6:17 AM

Fixed in revision 230484.