Skip to content

Conversation

frederick-vs-ja
Copy link
Contributor

In #4539, the ranges::for_each call in the resolution of LWG-4016 was "manually inlined" to reduce inclusion dependency. However, the inlining was not always correct, because builtin-in range-for may just stop and fail when a deleted member begin/end function is encountered, while ranges CPOs continue to consider ADL-found begin/end.

As a result, we should still use ranges::begin/ranges::end.

Fixes #5172.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner December 9, 2024 02:41
@StephanTLavavej StephanTLavavej added bug Something isn't working ranges C++20/23 ranges labels Dec 9, 2024
@StephanTLavavej StephanTLavavej self-assigned this Dec 9, 2024
@StephanTLavavej StephanTLavavej removed their assignment Dec 9, 2024
Co-authored-by: Hewill Kang <[email protected]>
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit 53432eb into microsoft:main Dec 13, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks for fixing this conformance bug in one of the STL's shortest-named functions! 🛠️ 🐞 2️⃣

@frederick-vs-ja frederick-vs-ja deleted the lwg-4016-regression branch December 15, 2024 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ranges C++20/23 ranges
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

<ranges>: ranges::to use range-based for loops in append branches
3 participants