Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace enable_if_t in _Debug_lt_pred with if constexpr and variable template #4610

Merged
merged 9 commits into from
Apr 26, 2024

Conversation

AlexGuteniev
Copy link
Contributor

No description provided.

...with `if constexpr` and variable template
@AlexGuteniev AlexGuteniev requested a review from a team as a code owner April 20, 2024 05:07
@AlexGuteniev

This comment was marked as resolved.

stl/inc/xutility Outdated Show resolved Hide resolved
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Apr 20, 2024
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

Thanks! After thinking about this for a bit, I figured out how to extract the noexcept verbosity. I think this transformation is now clearly correct, and while it adds a net 4 lines of source code, avoiding the on/off SFINAE and using our conventional if constexpr pattern is an improvement.

@StephanTLavavej StephanTLavavej self-assigned this Apr 26, 2024
@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 d74be47 into microsoft:main Apr 26, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

All shall love if constexpr and despair! 💚 🧝‍♀️ 💍

@AlexGuteniev AlexGuteniev deleted the unable_if branch April 27, 2024 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants