Prepare ranges test for MSVC fix#5378
Merged
StephanTLavavej merged 1 commit intomicrosoft:mainfrom Mar 31, 2025
Merged
Conversation
The compiler recently addressed an [external bug](https://developercommunity.visualstudio.com/t/conditional-operator-gives-wrong-result-/10665330) and along with that is a better system for handling user-authored casts in `decltype` expressions. The fix above does not completely fix the compiler behavior mentioned in the workaround, it only makes the compiler more consistently return the type determined in cast expressions.
StephanTLavavej
approved these changes
Mar 29, 2025
| static_assert(same_as<iter_rvalue_reference_t<int(int)>, int (&&)(int)>); | ||
| #else // ^^^ defined(_MSVC_INTERNAL_TESTING) / !defined(_MSVC_INTERNAL_TESTING) vvv | ||
| static_assert(same_as<iter_rvalue_reference_t<int(int)>, int (*)(int)>); | ||
| #endif // ^^^ !defined(_MSVC_INTERNAL_TESTING) |
Member
There was a problem hiding this comment.
No change requested: This comment is missing ^^^ at the end but it's fine, I'll be removing this preprocessor logic pretty soon anyways.
Member
|
Cameron is mirroring this in MSVC-PR-622777. |
Member
|
Thanks for keeping the STL and compiler working together! 😸 🎉 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The compiler recently addressed an external bug and along with that is a better system for handling user-authored casts in
decltypeexpressions.The fix above does not completely fix the compiler behavior mentioned in the workaround, it only makes the compiler more consistently return the type determined in cast expressions.