Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 P2443R1 views::chunk_by #2565
Implement P2443R1 views::chunk_by #2565
Changes from all commits
afaee5c
1dee182
dcce92f
590a377
14363e0
c6373d2
caa9ef1
b948cb0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 don't understand why, but I have observed that other
views
will switch to sayingstatic_cast<T&&>(t)
in theirrequires
, despite our usual currently preferred convention of usingforward
elsewhere. Not sure if this matters here. Example:STL/stl/inc/ranges
Lines 3806 to 3815 in afe0800
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.
And
filter
has mixedstatic_cast
and_STD forward
.STL/stl/inc/ranges
Lines 1841 to 1844 in afe0800
And
transform
even uses_STD move
.STL/stl/inc/ranges
Lines 2300 to 2303 in afe0800
@CaseyCarter do you remember why this was done in this way?
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.
We don't replace all uses of
forward
andmove
withstatic_cast
due to readability concerns. As a special exception to that rule, we do writestatic_cast
instead offorward
andmove
in concepts and constraints because compiler throughput concerns trump readability - at least until we could complete everything and get real numbers - and we want to avoid instantiating templates that may only ever be used in failing constraint checks.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.
Coda: I didn't complain here - despite that this would seemingly violate the general guideline - since there are no competing overloads of "
operator()
with arity 2" and noviews_chunkable
concept. I wouldn't mind if you decide to change this for consistency, but I won't demand it either.