Define begin() and end() methods in simple views#2673
Closed
dmitriy-sobolev wants to merge 8 commits into
Closed
Conversation
e3a15ce to
43e5da3
Compare
Contributor
|
From the CI errors, it seems like there are more views which may need this treatment, and it may reach into nanorange code. Its not clear to me how deep that rabbit hole goes. I don't see a ton of utility in retrofitting these legacy simple views other than resolving this specific build error. The path of least resistance here may be just making this begin / end functionality enabled if the underlying range supports it: #2674 . |
Contributor
Author
I like this perspective. I initially viewed it as a workaround to avoid body instantiation, but provide the return type. I'm closing the PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
It fixes a regression in inclusive_scan_by_segment_zip.pass, exclusive_scan_by_segment_zip.pass and shift_left_right.pass caused by #2618, which added these methods into drop_view_simple.
Example of an issue:
Alternative approaches:
deduce
__begin's return type without instantiating its body. Instantiation of a body will lead the the issue above.struct __internal::__ends_with_fn.I added begin()/end() to the rest views, assuming a view must have them.