This is an archive of the discontinued LLVM Phabricator instance.

[libc++][PSTL] Implement std::equal
AbandonedPublic

Authored by philnik on Aug 4 2023, 12:34 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Commits
rGed27a4edb038: [libc++][PSTL] Implement std::equal (#72448)

Diff Detail

Event Timeline

philnik created this revision.Aug 4 2023, 12:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2023, 12:34 PM
philnik requested review of this revision.Aug 4 2023, 12:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2023, 12:34 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik updated this revision to Diff 550017.Aug 14 2023, 10:22 AM

Update exception handling

ldionne added inline comments.
libcxx/include/__algorithm/pstl_equal.h
1

Missing documentation comment for the backend.

15

__utility/move.h

113
libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/pstl.equal.pass.cpp
48

We need to test combinations of empty ranges (empty/non-empty, non-empty/empty, empty/empty)

60–62

Why don't you just do this:

[](int lhs, int rhs) { return lhs % 2 == rhs % 2; };

Then you need to call that with two ranges that are not equal, but where all the elements have the same odd-ness.

libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/pstl.exception_handling.pass.cpp
25

boilerplate

This revision was landed with ongoing or failed builds.Tue, Nov 28, 1:02 PM