VS 2022 17.9
StephanTLavavej
released this
09 Mar 05:30
·
473 commits
to main
since this release
- Merged C++23 features:
- P0009R18 #3972 #4037
<mdspan>
- P1169R4 #4053
static operator()
- This updates CTAD (class template argument deduction) for
std::function
andpackaged_task
to work with a C++23 Core Language feature, currently supported for Clang only. When MSVC and IntelliSense implement this Core feature, this will automatically "light up" the STL's CTAD for them too.
- This updates CTAD (class template argument deduction) for
- P0009R18 #3972 #4037
- Merged partial C++23 features:
- Merged LWG issue resolutions:
- Fixed bugs:
- Fixed incorrect results from iostreams floating-point parsing (e.g.
"1e-07"
was incorrectly parsed as1e-06
). #3982- This fixed a regression that was introduced by #3364 in VS 2022 17.7.
- We backported this fix to VS 2022 17.8.
- Fixed compiler errors when using
expected
together withany
. #4013 - Fixed incorrect behavior when self-move-assigning
any
, and fixed compiler errors inany
involving incomplete types. #3965 - Fixed bugs in
basic_string
's copy assignment operator, specific to non-equalpropagate_on_container_copy_assignment
allocators, involving ASan annotations or fancy pointers. #4031 - Fixed
get()
and comparison operators to handle program-defined specializations ofarray
. #4041 - Fixed compiler errors in
to_array()
involving incomplete types. #4042 - Fixed linker errors involving
stl_asan.lib
by disabling ASan annotations in the STL for unsupported platforms (e.g. ARM, ARM64, ARM64EC). #4058 - Fixed
not_fn()
to return a perfect forwarding call wrapper in C++20 mode as required by P0356R5. #4057 - Fixed
deque
to preserve its internal invariants when taking advantage of allocators that provideallocate_at_least()
. #4017 - Fixed
deque
emplace()
andinsert()
to not require elements to be swappable; this change also improved performance. #4022 - Fixed
deque
to handle highly unusual fancy pointers. #4049 - Fixed
deque::shrink_to_fit()
to avoid requiring the allocator to be default constructible. #4071 - Fixed
allocate_shared()
for unbounded arrays to handle fancy pointers. #4074 - Fixed the implementation of P0408R7 Efficient Access To
basic_stringbuf
's Buffer to properly destroy fancy pointers. #4047 - Fixed
this_thread::sleep_until()
to consistently use the giventime_point
's clock type, instead of also depending on the system clock. This also fixedthis_thread::sleep_for()
to consistently usesteady_clock
. #3914 - Fixed minor conformance issues in
<random>
: #4120- Removed non-Standard
base_type
typedefs fromdiscard_block_engine
,independent_bits_engine
, andshuffle_order_engine
. - Fixed
discard_block_engine(Engine&&)
to move-construct the base engine instead of copying it.
- Removed non-Standard
- Fixed incorrect results from iostreams floating-point parsing (e.g.
- Improved performance:
- Optimized the
copy()
,copy_n()
, andmove()
algorithms forvector<bool>
iterators, with speedups varying from 1.8x (times, not percent) to an incredible 3200x, depending on the size and alignment of the bits being copied. #3353 #4045 - Optimized
priority_queue::push_range()
for small ranges. #4025 - Improved debug codegen for
deque
by using unchecked iterators internally. #4071 - Optimized
basic_string
's range constructors to usememmove()
for contiguous ranges when possible. #4073 - Added a vectorized implementation of
ranges::find_last
. #3925
- Optimized the
- Enhanced behavior:
- Added debug checks to
<valarray>
binary operations, verifying that the operands have the same size. #3911 - Deprecated
basic_istream
'sipfx()
/isfx()
andbasic_ostream
'sopfx()
/osfx()
member functions as they're non-Standard extensions. #4006 - Added compiler bug workarounds for the upcoming Clang 17 release. #4014
- Improved the STL's error messages so that error logs will record specific
static_assert
s like "error STL1000: Unexpected compiler version, expected Clang 16.0.0 or newer." instead of just "Error in C++ Standard Library usage." #4020 - Silenced
/Wall
warnings:- When building the Standard Library Modules. #4026
- Warning C4868 "compiler may not enforce left-to-right evaluation order in braced initializer list" throughout the STL. #4067
- Note:
/Wall
is not intended for regular production use, as it contains a large number of extremely noisy and low-value warnings. In general, the STL does not attempt to be/Wall
clean.
- Changed
num_get::do_get()
to tolerate 80-bitlong double
by removing astatic_assert
that was added in 2018. #4032- Note: 80-bit
long double
remains unsupported by MSVC.
- Note: 80-bit
- Improved
source_location::function_name()
: #4055- It will return detailed information for Clang 17.
- Added an "escape hatch" for all compilers: define
_USE_DETAILED_FUNCTION_NAME_IN_SOURCE_LOCATION
to0
. - For example, given
template <typename T> void cats()
called withcats<vector<int>>()
, MSVC's detailed info (implemented in VS 2022 17.6) is"void __cdecl cats<class std::vector<int,class std::allocator<int> >>(void)"
. Clang 17's detailed info is"void __cdecl cats(void) [T = std::vector<int>]"
. The escape hatch will return the basic info"cats"
.
- Changed the
ranges
algorithms to be ordinary function objects. #4098- For example, this allows code like
views::transform(ranges::distance)
to compile.
- For example, this allows code like
- Marked internal
extern "C"
functions asnoexcept
. #4106 #4150- This improves codegen for
/EHs
(versus/EHsc
, whereextern "C"
already impliesnoexcept
).
- This improves codegen for
- Added debug checks to
- Improved test coverage:
- Added an STL-ASan-CI pipeline. #3987 #3989 #4029 #4052 #4068 #4069 #4075
- The test harness now cleans up emitted files as it runs. #4086
- Simplified the feature-test macro test. #4103
- Enabled test coverage for
basic_string
's ASan annotations when exception handling interacts with the Small String Optimization. #4118
- Code cleanups:
- Removed unused code. #3964 #4005
- Removed compiler bug workarounds. #4012 #4028 #4039 #4083
- Various cleanups (described in detail in the PRs, not repeated here). #3940 #3973 #3974 #3984 #4015 #4016 #4036 #4087 #4111 #4113 #4117 #4119 #4121 #4122 #4123 #4124 #4125
- Ported a
<format>
table generator script from C++ to Python. #3994 - Improved how
<format>
uses the compiler macro_MSVC_EXECUTION_CHARACTER_SET
. #4076
- Improved documentation:
- Improved the consistency of preprocessor comments. #3950
- Infrastructure improvements:
- Updated
_MSVC_STL_UPDATE
. #4003 #4062