-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Implement views::all and views::reverse #1229
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
Conversation
Also, perma-workaround LLVM-37556.
... of the `CanBegin` etc. concepts now centralized in `<range_algorithm_support.hpp>`.
| STATIC_ASSERT(!CanBack<V const>); | ||
| STATIC_ASSERT(!CanIndex<V>); | ||
| STATIC_ASSERT(!CanIndex<V const>); | ||
| STATIC_ASSERT(!CanEmpty<V&>); |
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.
Sorry for this enormous set of mechanical changes. This is s/CanFront/CanMemberFront/g, s/CanBack/CanMemberBack/g, and tacking & onto every type argument. The "old" concepts in this file didn't care about value category - they forced all type parameters to lvalues - but the "new" concepts in <range_algorithms_support.hpp> do.
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.
This is some super impressive engineering here. 👍
From miscco. Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
... which are a complicated spelling of `true`.
StephanTLavavej
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, some comments but nothing blocking.
|
Thanks for contributing two range adaptors which are their own inverses! |
Implement views::all and views::reverse (microsoft#1229)
Also, perma-workaround LLVM-37556 by pulling the
_Cposnamespace intostdwith a using-directive rather than making it an inline namespace.There are some related changes to
view_interfacein<xutility>and_String_view_iteratorin<xstring>to silence warnings about comparing integer types of different signed-ness.There are also changes to enable
test::rangeto modelviewfor use in testing range adaptors.Partially addresses #39.