You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hewillk
changed the title
<ranges>: ranges::to use range-based for loops in append branches
[libc++] <ranges>: ranges::to use range-based for loops in append branches
Dec 8, 2024
It looks like libc++ extensively uses range-for loops to iterate over ranges when implementing P1206, so this should be something that can be modified uniformly (if worth it).
Yeah, I think there should be an LWG or CWG issue about this. Not being able to iterate a range with a range-based for loop sounds a lot like a design flaw to me.
llvm-project/libcxx/include/__ranges/to.h
Lines 112 to 124 in 6c062af
Range-based for loop is not guaranteed to be well-formed for
input_range
as it does not extract iterator-pair throughranges::begin
/ranges::end
:https://godbolt.org/z/Kc3dsvnfW
The text was updated successfully, but these errors were encountered: