Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement most ranges partition algorithms #976

Merged
merged 5 commits into from
Jul 11, 2020

Conversation

CaseyCarter
Copy link
Member

Includes ranges::is_partitioned, ranges::partition, ranges::partition_copy, and ranges::partition_point.

Partially addresses #39.

Includes `ranges::is_partitioned`, `ranges::partition`, `ranges::partition_copy`, and `ranges::partition_point`.
@CaseyCarter CaseyCarter added the cxx20 C++20 feature label Jul 3, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner July 3, 2020 05:25
@CaseyCarter CaseyCarter mentioned this pull request Jul 3, 2020
@StephanTLavavej StephanTLavavej changed the title Implement most partition family algorithms Implement most ranges partition algorithms Jul 3, 2020
stl/inc/algorithm Outdated Show resolved Hide resolved
stl/inc/algorithm Outdated Show resolved Hide resolved
stl/inc/algorithm Outdated Show resolved Hide resolved
stl/inc/algorithm Outdated Show resolved Hide resolved
stl/inc/algorithm Outdated Show resolved Hide resolved
tests/std/tests/P0896R4_ranges_alg_partition/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/P0896R4_ranges_alg_partition_copy/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/P0896R4_ranges_alg_partition_copy/test.cpp Outdated Show resolved Hide resolved
tests/std/tests/P0896R4_ranges_alg_partition_copy/test.cpp Outdated Show resolved Hide resolved
stl/inc/algorithm Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added the ranges C++20/23 ranges label Jul 8, 2020
@StephanTLavavej StephanTLavavej self-assigned this Jul 10, 2020
Copy link
Contributor

@cbezault cbezault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code doing the actual work and the tests look good to me.
I can't really say I have the deepest grasp on all the details of the templating for some of these functions but after staring at them for half an hour with the standard up they seem to make sense to me.

@StephanTLavavej StephanTLavavej merged commit 6d441a1 into microsoft:master Jul 11, 2020
@StephanTLavavej
Copy link
Member

Thanks for implementing some of my favorite algorithms! 😸

Vaguely related historical trivia: std::partition_point was linear time until Nov 2011. 🙀

@CaseyCarter CaseyCarter deleted the part branch September 7, 2020 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cxx20 C++20 feature ranges C++20/23 ranges
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants