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
[range.split] The example does not work after P2499R0 #6017
Comments
Yeah, this looks good to me. |
dangelog
added a commit
to dangelog/cplusplusdraft
that referenced
this issue
Dec 30, 2022
After P2499R0 it is no longer possible to implicitly construct a string_view out of a range (like the ones produced by views::split). Use explicit construction instead. Fixes cplusplus#6017
dangelog
added a commit
to dangelog/cplusplusdraft
that referenced
this issue
Dec 30, 2022
After P2499R0 it is no longer possible to implicitly construct a string_view out of a range (like the ones produced by views::split). Use explicit construction instead. Fixes cplusplus#6017
dangelog
added a commit
to dangelog/cplusplusdraft
that referenced
this issue
Jan 19, 2023
…ng_view in the example After P2499R0 it is no longer possible to implicitly construct a string_view out of a range (like the ones produced by views::split). As a solution, use explicit construction instead. This is purely editorial, as it affects only the example code. Fixes cplusplus#6017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://eel.is/c++draft/range.split.overview#3 has this example:
This implicitly constructs a
std::string_view
out of each subrange obtained bysplit
. This does not compile any more because the corresponding constructor has been madeexplicit
by P2499R0, andsplit
doesn't seem to have the same shortcuts that other views have (e.g.take
out ofstring_view
yields anotherstring_view
).Possible solution: make the construction explicit:
The text was updated successfully, but these errors were encountered: