Skip to content

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Jan 21, 2023

Fixes #3025

Yes, I saw @frederick-vs-ja 's comment and we can change every use _Make_unsigned_like_t to make_unsigned_t when the C++ standard will be changed.

@fsb4000 fsb4000 requested a review from a team as a code owner January 21, 2023 14:35
@StephanTLavavej StephanTLavavej added bug Something isn't working ranges C++20/23 ranges labels Jan 22, 2023
@StephanTLavavej
Copy link
Member

Thanks! I pushed a conflict-free merge with main, followed by a rename to avoid shadowing std::prev, moving the test to the views::iota test, and testing it both at run-time and compile-time.

Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@StephanTLavavej
Copy link
Member

@CaseyCarter @strega-nil-ms I pushed your suggested change. I refrained from adding a _To_unsigned_like() fallback function, but we'll notice if we ever need it in the future and it can easily be added then.

@StephanTLavavej StephanTLavavej self-assigned this Jan 27, 2023
@StephanTLavavej
Copy link
Member

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

…tion with `views::iota` and `views::transform`".
@StephanTLavavej
Copy link
Member

I had to push an additional commit to work around the previously reported VSO-1666180 "/clr C++20 x64 System.AccessViolationException with views::iota and views::transform".

@StephanTLavavej StephanTLavavej merged commit 1a28409 into microsoft:main Jan 28, 2023
@StephanTLavavej
Copy link
Member

Thanks for fixing this bug and improving ranges usability! 🐞 🛠️ 😸

@fsb4000 fsb4000 deleted the fix3025 branch January 28, 2023 05:31
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
None yet
Development

Successfully merging this pull request may close these issues.

<iterator>: ranges::prev maybe ill-formed in debug mode
5 participants