-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement views::filter #1252
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 views::filter #1252
Conversation
miscco
left a comment
There was a problem hiding this 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
MahmoudGSaleh
left a comment
There was a problem hiding this 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.
|
Finally, a way to remove unwanted chaff from our ranges. The world truly owes you a debt of gratitude for this contribution. |
Relocates
ranges::find_iffrom<algorithm>to<xutility>so it can be used inranges::filter_viewwithout including<algorithm>. Also implements the proposed resolution of LWG-3481 (a reformulation of the conceptviewable_range).The standard uses the name
basefor the non-static data member of view types that holds the underlying view, andBaseto name the (possibly-const) corresponding view type for custom iterators and sentinels. Trying to use the ugly_Basefor both purposes in our implementation is confusing, so I've decided to use_Rangefor the former case and_Basefor the latter. This PR renames the pertinent member ofreverse_viewto be consistent with this guideline.