-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
P2278R4: cbegin
should always return a constant iterator ("Ranges" and "Span" sections)
#3187
Conversation
…ng in `<ranges>`
* Mark `_Possibly_const_range` as `noexcept` * Mark `_Possibly_const_range` and `_As_const_pointer` as `_NODISCARD` * Use `declval<T&>` (instead of `declval<T>`) inside of CPOs' template decl * Add workaround in `_Possibly_const_range` for yet (possibly) unreported MSVC error
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
This comment was marked as resolved.
This comment was marked as resolved.
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.
very minor request, otherwise this looks great!
…t_cast` (as @strega-nil-ms suggested)
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.
Thanks for all your hard work!!!
Thanks, this is awesome, with very thorough test coverage! 😻 I've pushed small commits to fix |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for implementing another big part of this feature! 😻 📈 🚀 |
Towards #2918 - "
cbegin
should always return a constant iterator".view_interface::cbegin
is underconstrained",const_sentinel_t
is missing".clang-format [off/on]
comments aroundview_interface
,clang-format [off/on]
comments around updated CPOs,<ranges>
header (near new type aliases).range_algorithm_support.hpp
to detect membercbegin
andcend
functions,P0896R4_ranges_range_machinery\test.cpp
so it would not fail with updated CPOs,P0896R4_ranges_subrange\test.cpp
to test new members ofview_interface
.cbegin
should always return a constant iterator ("Ranges" and "Span" sections) #3187 (comment)):Tests
std/containers/views/views.span/types.pass.cpp
std/ranges/range.access/begin.pass.cpp
std/ranges/range.access/data.pass.cpp
std/ranges/range.access/end.pass.cpp
std/ranges/range.access/rbegin.pass.cpp
std/ranges/range.access/rend.pass.cpp
Added workaround inChangedpossibly-const-range
for MSVC bug DevCom-10187107 (repro: https://godbolt.org/z/d3GhhxTqT).possibly-const-range
to usestd::as_const
instead ofconst_cast
(as @strega-nil-ms suggested in P2278R4:cbegin
should always return a constant iterator ("Ranges" and "Span" sections) #3187 (comment)).<span>
header,input_iterator
concept (soconstant_range
could work),typename
toclass
in template declarations in tests from P2278R4:cbegin
should always return a constant iterator ("Iterators" section only) #3043,yvals_core
comment tomissing views::as_const
.