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

Updated fold to P2322R5 (no projections, rename) #1668

Merged
merged 2 commits into from Dec 12, 2021

Conversation

brevzin
Copy link
Collaborator

@brevzin brevzin commented Oct 19, 2021

Per LEWG telecon, renaming foldl/foldr to fold_left/fold_right and the *1 suffix to _first for the left fold and _last for the right fold. Names not finalized yet, but seem more likely to be the final names than foldl/foldl1/foldr/foldr1.

Also removing the projections. First, they were implemented incorrectly anyway. Second, for the variants with no initial value, the projection doesn't really work. This is explained in P2322R5 (see here until that one is published).

@cjdb
Copy link
Contributor

cjdb commented Dec 12, 2021

Can you please add #include <range/v3/algorithm/fold.hpp> to <range/v3/algorithm.hpp>? I can close #1682 after that.

@brevzin
Copy link
Collaborator Author

brevzin commented Dec 12, 2021

Can you please add #include <range/v3/algorithm/fold.hpp> to <range/v3/algorithm.hpp>? I can close #1682 after that.

Sure.

@CaseyCarter CaseyCarter merged commit 9aa032c into ericniebler:master Dec 12, 2021
@CaseyCarter
Copy link
Collaborator

Merging despite unrelated CI failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants