Skip to content

use _Make_unsigned_like_t instead of make_unsigned_t for _Max_possible_v - #3356

Merged
Stephan T. Lavavej (StephanTLavavej) merged 10 commits into
microsoft:mainfrom
fsb4000:fix3025
Jan 28, 2023
Merged

Stephan T. Lavavej (StephanTLavavej) merged 10 commits into
microsoft:mainfrom
fsb4000:fix3025

Conversation

@fsb4000

Copy link
Copy Markdown
Contributor

Fixes #3025

Yes, I saw A. Jiang (@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
Igor Zhukov (fsb4000) requested a review from a team as a code owner January 21, 2023 14:35
Comment thread stl/inc/xutility Outdated
Co-authored-by: A. Jiang <de34@live.cn>
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added bug Something isn't working ranges C++20/23 ranges labels Jan 22, 2023
Comment thread tests/std/tests/P0896R4_views_drop/test.cpp Outdated
Comment thread tests/std/tests/P0896R4_views_drop/test.cpp Outdated
Comment thread stl/inc/xutility Outdated
@StephanTLavavej

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this!

Comment thread stl/inc/xutility Outdated
@StephanTLavavej

Copy link
Copy Markdown
Member

Casey Carter (@CaseyCarter) nicole mazzuca (@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

Copy link
Copy Markdown
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
Copy Markdown
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
Stephan T. Lavavej (StephanTLavavej) merged commit 1a28409 into microsoft:main Jan 28, 2023
@StephanTLavavej

Copy link
Copy Markdown
Member

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

@fsb4000
Igor Zhukov (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