-
Notifications
You must be signed in to change notification settings - Fork 4
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
PL247 22.07.3 [views.span] span::c/begin/end return type confusion LWG 3320 #243
Comments
LEWG in Belfast: We would like LWG to drop cbegin/cend/crbegin/crend, const_iterator, const_reverse_iterator from span. (Consulting with the author of PL247, this would resolve their concerns.) |
LWG small group Tuesday Belfast - need an LWG issue - assignment made. |
The associated issue is LWG 3320 |
Issue processed during Wed night issue processing in Belfast and set to Ready. |
Removed const_iterator type from gsl::span causes problems with boost::range - following function is not possible to compile:
I tried several signatures and none of them work:
It is necessary to construct new range using boost::make_iterator_range(nums.begin(), nums.end()) and then it works .. but it is IMO not nice. |
@bishopnator, This issue tracker is for administratively tracking the progress of NB comments against C++20. The processing has finished and C++20 is in its final stages of balloting before publication. Please use other forums for technical discussions, e.g. the appropriate committee reflector or the lwgchair address for submitting library issues. Beyond that, I'd like to point out that entities in namespace "gsl" are not in scope for the C++ standard. |
span<T> provides a const-qualified begin() method and cbegin() method that produces a different result if T is not const-qualifed:
As consequence for the object s of type span<T>, the call to the std::cbegin(s)/std::ranges::cbegin(s) produces different result than s.cbegin().
Proposed change:
Change span<T> members cbegin()/cend()/crbegin()/crend()/const_iterator to be equivalent to begin()/end()/rbegin()/rend()/iterator respectivelly.
The text was updated successfully, but these errors were encountered: