-
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 <ranges>
and <format>
into C++20
#2518
Conversation
* In `<yvals_core.h>`, don't require `_HAS_CXX23` to define `__cpp_lib_format` and `__cpp_lib_ranges`. Change the feature-test macro test consistently. * Change test matrices for all tests that touch `<ranges>` and `<format>` to run in 20 mode instead of latest-only. * Don't use the `span` constructor added by P1989 to C++23 in `P0896R4_views_split`, which now must run in c++20 mode where that constructor is unavailable. Fixes microsoft#1814.
If there's a need to introduce 128-bit integers, maybe put them into an "extended" header, not "internal" header, and address DevCom-879048 ? |
If there's an issue with |
Can/should this new big integer be merged with big integer from #2366 ? |
Good question - but no, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, feel free to ignore all the debug codegen stuff. We can do this later when time is not pressing
The type exists and is available if people want to use it, albeit with the hard-to-spell name
The goal of the change isn't to require the library to provide arbitrary-precision integers, its to ensure that people don't stumble into UB using |
Extract a common base, and reorganize.
with fixes for the failures uncovered. Address review comments.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thank me for pushing to get this done a week ahead of my planned schedule, and extra-special thanks to @StephanTLavavej for the real-time code review to make it possible! ❤️ (Historical note: I bypassed branch policy - as discussed with STL over the weekend - to merge this with only one maintainer review due to time crunch. We did have a few very good contributor reviews to add confidence.) |
and add 128-bit signed and unsigned integer-class types to be the difference of
iota_view<64-bits>
.In
<yvals_core.h>
, don't require_HAS_CXX23
to define__cpp_lib_format
and__cpp_lib_ranges
. Change the feature-test macro test consistently.Change
env.lst
for all tests that touch<ranges>
and<format>
to use20
matrices instead oflatest
.Don't use the
span
constructor added to C++23 by WG21-P1989 inP0896R4_views_split
, which now must run in C++20 mode where that constructor is unavailable.Fixes #1814.
For ease of review there are two commits: the first is just the 23-to-20 changes, and the second adds the integer-class type.
Internal-only changes
Reminder for MSVC-internal tasks (the "add new internal header" things):
vctowner
that we're adding a new internal header__msvc_int128.hpp
.src/vctools/crt/lkgsync/updatelkgmanifest.cmd
.src/SetupPackages/swix/crt.headers/files.base.swr
.src/vctools/crt/copy_crt/copy_crt.nativeproj
.src/qa/VC/FE/compiler/tests/cxx/modules/dependency-scanning/header-units/deps.cpp
.src/qa/VC/FE/compiler/tests/cxx/modules/dependency-scanning/header-units/stl-header-units.dat
.