This is an archive of the discontinued LLVM Phabricator instance.

[libc++][ranges] Implement `ranges::remove_copy{, _if}`.
ClosedPublic

Authored by var-const on Jul 26 2022, 2:15 PM.

Diff Detail

Event Timeline

philnik created this revision.Jul 26 2022, 2:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2022, 2:15 PM
huixie90 updated this revision to Diff 448352.Jul 28 2022, 8:54 AM
  • finalise ranges::remove_copy{_if}
  • fixed a bug where ranges::remove_copy_if got the predicate inverted
  • enabled all the "robust" tests
  • added tests for ranges::remove_copy_if
huixie90 published this revision for review.Jul 28 2022, 8:55 AM
huixie90 added reviewers: var-const, philnik.
Herald added a project: Restricted Project. · View Herald TranscriptJul 28 2022, 8:56 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
var-const added inline comments.Jul 29 2022, 11:56 PM
libcxx/include/algorithm
832

Missing the definition of remove_copy_result.

libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
48

Needs tests for indirectly_copyable and indirect_binary_predicate.

175

Need to count invocations of the predicate as well.

libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy_if.pass.cpp
61 ↗(On Diff #448352)

This should be made consistent with the other test file.

223 ↗(On Diff #448352)

These two files should ideally be almost mirror versions of each other.

var-const commandeered this revision.Jul 29 2022, 11:57 PM
var-const removed a reviewer: var-const.
var-const retitled this revision from [libc++] Implement ranges::remove_copy{, _if} to [libc++][ranges] Implement `ranges::remove_copy{, _if}`..Aug 1 2022, 2:02 AM
var-const updated this revision to Diff 448959.Aug 1 2022, 2:06 AM

Address the existing feedback and rebase on main.

ldionne accepted this revision.Aug 2 2022, 2:14 PM
This revision is now accepted and ready to land.Aug 2 2022, 2:14 PM
This revision was automatically updated to reflect the committed changes.