Skip to content

Conversation

@CaseyCarter
Copy link
Contributor

Relocates ranges::find_if from <algorithm> to <xutility> so it can be used in ranges::filter_view without including <algorithm>. Also implements the proposed resolution of LWG-3481 (a reformulation of the concept viewable_range).

The standard uses the name base for the non-static data member of view types that holds the underlying view, and Base to name the (possibly-const) corresponding view type for custom iterators and sentinels. Trying to use the ugly _Base for both purposes in our implementation is confusing, so I've decided to use _Range for the former case and _Base for the latter. This PR renames the pertinent member of reverse_view to be consistent with this guideline.

@CaseyCarter CaseyCarter added cxx20 C++20 feature high priority Important! ranges C++20/23 ranges labels Sep 1, 2020
@CaseyCarter CaseyCarter requested a review from a team as a code owner September 1, 2020 16:59
Copy link
Contributor

@miscco miscco left a comment

Choose a reason for hiding this comment

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

I came until the tests some smaller nits

@CaseyCarter CaseyCarter mentioned this pull request Sep 1, 2020
@StephanTLavavej StephanTLavavej removed their assignment Sep 2, 2020
Copy link
Member

@MahmoudGSaleh MahmoudGSaleh left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@CaseyCarter CaseyCarter self-assigned this Sep 4, 2020
@CaseyCarter CaseyCarter merged commit 37cd02e into microsoft:master Sep 4, 2020
@CaseyCarter CaseyCarter deleted the filter_view branch September 4, 2020 19:36
@CaseyCarter
Copy link
Contributor Author

Finally, a way to remove unwanted chaff from our ranges. The world truly owes you a debt of gratitude for this contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cxx20 C++20 feature high priority Important! ranges C++20/23 ranges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants