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
Help with adapting split_view to take a length rather than a pattern. #277
Comments
It may be helpful to look at the implementation of range-v3's |
So I have Note 1.
produces:
A couple of questions:
After this, I plan on implementing cheers, |
This is my implementation of Example usage:
|
I initially tried to get this functionality by combining off-the-shelf views, but I don't think that is possible.
So, I am trying to write a group_view that is analogous to split_view but takes a length rather than a pattern. After puzzling over the code for a long while, here is how I think I should proceed:
Change all the construction paths to take a Length rather than a Pattern and store the Length in the view . The Length will necessarily be an Integral type. If the length
Change
outer_iterator::operator++
to move forward Length units at a time.Change
outer_iterator::value_type
to be something like subrange. Or, can I use subrange directly here?Is there a better approach?
Any guidance is appreciated.
cheers,
mark
The text was updated successfully, but these errors were encountered: