This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Implement P2136R3 std::invoke_r
ClosedPublic

Authored by ldionne on Feb 8 2023, 3:02 PM.

Details

Reviewers
Mordante
Group Reviewers
Restricted Project
Commits
rG87cc95a904e0: [libc++] Implement P2136R3 std::invoke_r

Diff Detail

Event Timeline

ldionne created this revision.Feb 8 2023, 3:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 3:02 PM
Herald added a subscriber: arichardson. · View Herald Transcript
ldionne requested review of this revision.Feb 8 2023, 3:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 3:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision.Feb 11 2023, 7:33 AM
Mordante added a subscriber: Mordante.

In general LGTM, but some questions.

libcxx/include/__functional/invoke.h
550

Why not return the void value? This is valid nowadays.

libcxx/test/std/utilities/function.objects/func.invoke/invoke_r.pass.cpp
131

These tests are also testing references, to non-temporaries, return types?

This revision is now accepted and ready to land.Feb 11 2023, 7:33 AM
ldionne marked 2 inline comments as done.Feb 13 2023, 5:46 AM
ldionne added inline comments.
libcxx/include/__functional/invoke.h
550

I guess there's no real reason except following the standard to the letter. cv-qualifiers are ignored from return values so that should also not be an issue. I'm leaning towards leaving as-is though.

libcxx/test/std/utilities/function.objects/func.invoke/invoke_r.pass.cpp
131

Yes, I just checked and they do!

This revision was automatically updated to reflect the committed changes.
ldionne marked 2 inline comments as done.
libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp