Skip to content

<__msvc_math.hpp>: Restore and test _USE_MATH_DEFINES support - #6446

Open
Stephan T. Lavavej (StephanTLavavej) wants to merge 1 commit into
microsoft:mainfrom
StephanTLavavej:math-constants
Open

<__msvc_math.hpp>: Restore and test _USE_MATH_DEFINES support#6446
Stephan T. Lavavej (StephanTLavavej) wants to merge 1 commit into
microsoft:mainfrom
StephanTLavavej:math-constants

Conversation

@StephanTLavavej

Copy link
Copy Markdown
Member

Followup to #6413.

While validating /Zc:cmath (which enables LLVM libc generally, and C++23/26 constexpr <cmath> specifically) against our Real World Code test suite of popular open-source projects, Cody Miller (@Codiferous) found that usage of our non-Standard math macros is extremely widespread, and this is a major blocking issue for /Zc:cmath adoption.

As a general rule we still want to avoid providing non-Standard legacy math machinery in our new replacement header, but in this case we need to compromise for the sake of practicality. The good news is that this stuff is opt-in via an _Ugly macro, so users won't get it if they don't specifically ask for it.

Copilot AI balanced review requested due to automatic review settings September 10, 2026 23:31
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the enhancement Something can be improved label Sep 10, 2026
@github-project-automation github-project-automation Bot moved this to Initial Review in STL Code Reviews Sep 10, 2026
@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) moved this from Initial Review to Final Review in STL Code Reviews Sep 10, 2026
@azure-pipelines

This comment was marked as resolved.

This comment was marked as resolved.

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

Status: Final Review

Development

Successfully merging this pull request may close these issues.

2 participants