VS 2022 17.3
StephanTLavavej
released this
09 Mar 05:26
·
1147 commits
to main
since this release
- Merged C++23 features:
- Merged partial C++23 features:
- Merged LWG issue resolutions:
- LWG-3121 #2640
tuple
constructor constraints forUTypes&&...
overloads - LWG-3525 #2639
uses_allocator_construction_args
fails to handle types convertible topair
- LWG-3570 #2418
basic_osyncstream::emit
should be an unformatted output function - LWG-3571 #2418
flush_emit
should setbadbit
if theemit
call fails
- LWG-3121 #2640
- Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
- Fixed bugs:
- Fixed
vector<bool>
to properly invalidate iterators during reallocation, which fixes compiler errors withconstexpr
usage ofvector<bool>
. #2441 empty_view
rvalues are now consideredborrowed_range
s as required by the Standard. #2576- Added compiler bug workarounds to
is_convertible
andcommon_reference
, socontiguous_iterator<const volatile int*>
is nowtrue
. #2592 - Added missing constraints to functions that were implied by "Effects: Equivalent to" Standardese:
make_any()
,make_optional()
,shared_ptr::operator=()
,shared_ptr::reset()
, andweak_ptr::operator=()
. - Fixed
filesystem::path
's comparison operators and some other member functions being IF-NDR (ill-formed, no diagnostic required) in C++23 mode. #2457 - Fixed C++20
<chrono>
parsing to fail when the input is insufficient to supply the entire format string. #2523- For example, the input
"23:59"
is insufficient for the format string"%H:%M:%S"
.
- For example, the input
- Fixed an out-of-bounds read in
ranges::find()
withunreachable_sentinel
. #2434 - Added compiler bug workarounds for CUDA (involving
[[nodiscard]] friend
) to fix spurious cases of "warning C5240: 'nodiscard': attribute is ignored in this syntactic position". #2622 - Removed
ExecutionPolicy
overloads ofcopy_backward()
andmove_backward()
that were mistakenly implemented. They don't appear in the Standard because they would be useless. #2627 - Added compiler bug workarounds for Clang (involving the ordering of constrained and unconstrained destructors) to fix compiler errors in
<ranges>
machinery. #2630 - Fixed a bug affecting
<future>
's use of<ppltasks.h>
in Desktop XAML apps. #2654 - Fixed a bug that prevented C++20
<chrono>
from parsing fractional seconds as floating-pointduration
s. #2638 - Fixed
<bit>
'scountl_zero()
returning incorrect results on ARM64 for 8-bit and 16-bit types. #2647 - Added macroization guards to the STL's usage of compiler-specific custom attributes. #2649
- Fixed
get_time()
andtime_get
's 2-digit year logic. #2666 - Fixed
system_category().message()
to behave correctly instead of returning"???"
when the user language and system language are different. #2669 - Fixed the ARM64EC implementations of
atomic_thread_fence()
andatomic<8-byte type>::store()
. #2702 - Fixed compiler errors in
atomic<shared_ptr<T[]>>
,atomic<shared_ptr<T[N]>>
,atomic<weak_ptr<T[]>>
, andatomic<weak_ptr<T[N]>>
. #1339 - Added overloads of
<cmath>
'slerp()
for arithmetic types. #2113 - Fixed
filesystem::directory_entry
to work with FAT32 and exFAT. #2373 <filesystem>
now handles special system files likehiberfil.sys
. #2715filesystem::copy_file()
now tolerates other processes having opened the source file or the target file for reading or writing (as much as possible, depending on the choice ofcopy_options
). #2718- Fixed the visualizers for
shared_ptr<void>
,weak_ptr<void>
, andunique_ptr<void, Deleter>
. #2706 - Fixed compiler errors in
move_only_function
when compiling<functional>
in/std:c++latest
mode with/Zc:alignedNew-
. #2712 - Implemented C++20's removal of the explicit specialization for
allocator<void>
. #2726- Note that
allocator<void>
is still supported, it just uses the primary template now.
- Note that
- Fixed "unresolved external symbol" linker errors in certain scenarios involving separately compiled third-party libraries. #2734 #2738
- On x64, these errors mentioned
__imp___std_init_once_begin_initialize
and__imp___std_init_once_complete
. - On x86, these errors mentioned
__imp____std_init_once_begin_initialize@16
and__imp____std_init_once_complete@12
. - This fixed a regression that was introduced by #2381 in VS 2022 17.2.
- This fix was backported to VS 2022 17.2.5.
- On x64, these errors mentioned
- Fixed
- Improved performance:
- Optimized
rotl()
androtr()
in<bit>
for 8-bit and 16-bit integers by using compiler intrinsics. #2611 - Optimized the vectorized implementation of
reverse()
for 32-bit trivial types. #2383 - Improved
<format>
performance when the execution character set isn't self-synchronizing, by caching expensive calls to get codepage info. #2600 - Added vectorized implementations of
find()
,count()
,ranges::find()
, andranges::count()
, with speedups ranging from 2.0x to 27.6x (times, not percent). #2434 - Slightly improved the performance of
<charconv>
floating-pointfrom_chars()
. #2623
- Optimized
- Improved throughput:
- Used
if constexpr
instead of tag dispatch, overloads, or specializations in:is_permutation()
,sample()
,rethrow_if_nested()
, anddefault_searcher
. #2219<map>
and<set>
's common machinery. #2287polymorphic_allocator
. #2471basic_string_view
andbasic_string
'sfind_first_of()
,find_last_of()
,find_first_not_of()
, andfind_last_not_of()
. #2479 #2660<regex>
. #2484- Parallel
inclusive_scan()
andtransform_inclusive_scan()
. #2662 scoped_allocator_adaptor
'soperator==()
. #2677function
,move_only_function
, andbind()
. #2668vector<bool>::insert()
. #2694
- Replaced tag dispatch with SFINAE in
subtract_with_carry_engine
's internal machinery. #2693 - Split
<chrono>
into a smaller internal header, improving throughput when other headers need only pre-C++20<chrono>
machinery. #2604
- Used
- Enhanced behavior:
- Changed
<deque>
to use scope guards instead ofthrow;
, making debugging easier when exceptions are thrown. #2308 - Merged an MSVC-specific attribute, allowing the compiler to improve its handling of
constexpr
dynamic allocation andconstexpr unique_ptr
. #2658 - Implemented
<format>
grapheme clusterization when determining the width of a string for padding and alignment purposes. This is a "quality of implementation" feature recommended by N4910[format.string.std]/11
. #2119 - Changed
<strstream>
to deprecate its classes instead of the entire header. #2680 - C++98's
unexpected()
in<exception>
was removed by C++17. As with almost all removals, we support an escape hatch to restoreunexpected()
, by defining_HAS_UNEXPECTED
to1
. However, this escape hatch conflicts with C++23, which is reusing the identifier forunexpected<E>
in<expected>
. Therefore, the escape hatch is now blocked with an#error
in C++23 mode. #2709 - Added ASan (Address Sanitizer) annotations to
<string>
, allowing additional errors to be detected. #2196 <ciso646>
now emits a warning in C++20 mode, as it was removed in that Standard. #2710- Temporarily disabled
join_view
for non-forward_range
s until LWG-3698 is resolved. #2727 <random>
distributions now have non-const
function call operators, making it easier to write portable code. #2732
- Changed
- Improved documentation:
- Improved test coverage:
- Dramatically improved the compiler memory consumption and compile time of two
ranges
algorithm tests. #2657 - Removed
/Za
test coverage. #2714/Za
is "not recommended" and has been superseded by/permissive-
.
- Dramatically improved the compiler memory consumption and compile time of two
- Code cleanups:
- Removed compiler bug workarounds. #2611
- Various cleanups (described in detail in the PRs, not repeated here). #2595 #2621 #2656 #2673 #2674 #2675 #2676 #2678 #2679 #2686
- Simplified the preprocessor logic in
<stdatomic.h>
for non-compiler tools. #2615 - Removed test workarounds now that VCRuntime properly recognizes Clang's
/std:c++20
and/std:c++latest
modes. #2637
- Infrastructure improvements:
- Fixed the build system to avoid relinking any DLLs when rerunning CMake and Ninja with no other changes. #2606
- Added
format
andvalidate
targets to CMake, so it can run clang-format in parallel, and improved how Azure Pipelines runs the Code Format Validation check. #2671 #2697 - Updated dependencies. #2611 #2651 #2714
- Updated build compiler to VS 2022 17.3 Preview 1 (17.2 is now required).
- Updated to Windows 11 SDK 22000. This is now required for building and testing the STL, but not for using it. #2729
- Updated Python to 3.10.4.
- Updated
_MSVC_STL_UPDATE
. #2634 #2696