Implement LWG-3599 The const overload of lazy_split_view::begin should be constrained by const Pattern#6268
Conversation
const overload of lazy_split_view::begin should be constrained by const Pattern
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Implements the LWG-3599 resolution for views::lazy_split by tightening const-overload constraints and adding a regression test.
Changes:
- Add a new
test_lwg_3599()regression test forviews::lazy_split. - Constrain
lazy_split_view::begin() constand theend() constcommon-range branch onforward_range<const _Pat>.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/std/tests/P0896R4_views_lazy_split/test.cpp | Adds a new LWG-3599 regression test exercising lazy_split behavior. |
| stl/inc/ranges | Tightens constraints for lazy_split_view const iteration based on the pattern’s const forward-iterability. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| static_assert(ranges::forward_range<remove_cvref_t<decltype(r)>>); | ||
| static_assert(!ranges::forward_range<const remove_cvref_t<decltype(r)>>); | ||
| static_assert(ranges::forward_range<remove_cvref_t<decltype(f)>>); |
There was a problem hiding this comment.
No change requested: The remove_cvref_ts aren't doing anything because the variables are plain auto, but I suppose this makes it very clear that we don't want any cvref qualifiers.
|
I'm mirroring this to the MSVC-internal repo. Please notify me if any further changes are pushed, otherwise no action is required. |
|
Thanks for improving this lazy kitty! 🐱 💤 🐈 |
Fixes #6202.
Blocked libcxx test(s):
std/ranges/range.adaptors/range.lazy.split/begin.pass.cpp