-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Move numerous components from <xstddef>
to other headers and reduce inclusion
#3623
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
And reorder the skipping for LWG-3865
<xstddef>
etc.: Reduce inclusion dependency<xstddef>
to other headers and reduce inclusion
I've analyzed this PR's changes to understand their potential source-breaking impact.
In practice, the breaking change impact I've seen in the compiler's test suite has been:
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for improving the STL's throughput and helping users to be more disciplined about inclusion! This ended up being more source-breaking than I originally expected, but hopefully we can power through the resulting breaks and ship this in VS 2022 17.7. 🚀 🚢 😹 |
Given that this breaks code when updating to VS17.7, could a note be included inside the release notes for VS17.7 discussing the breaking change? |
This is already recorded in the Changelog, although it's not automatically merged into release notes. |
This PR is trying to reduce inclusion dependency. Towards #3599.
The most signification changes are aboutI believe most of the contents of<xstddef>
.<xstddef>
should be moved to other headers (especially<type_traits>
and<xutility>
), which is probably "pure win" for throughput.Unfortunately,__builtin_bit_cast
is used in<compare>
instead of a wrapper function (or the standard functionstd::bit_cast
), because I didn't find the right place for the real function.I previously tried to remove<cwchar>
dependency for <limits>
in #3482, but that PR was blocked by some compiler bugs.Edit: this PR is now only focusing on
<xstddef>
. I've reported DevCom-10331466 due to the failed/skipped libc++test for<stdlib.h>
.Driven-by change: reordering the entry for LWG-3865 in
expected_results.txt
.