vs-2022-17.7
版本发布时间: 2024-03-09 13:29:12
microsoft/STL最新发布版本:vs-2022-17.11(2024-08-15 19:47:14)
- Merged C++23 features:
-
P1467R9 #3583 Extended Floating-Point Types
-
Note: This means that we provide the
<stdfloat>
header containing an emptynamespace std {}
, as we don't support any optional extended floating-point types.
-
Note: This means that we provide the
-
P2093R14 #3337
<print>
: Formatted Output-
P2539R4 Synchronizing
print()
With The Underlying Stream
-
P2539R4 Synchronizing
-
P2164R9 #3472
views::enumerate
-
P2165R4 #3372 Compatibility Between
tuple
,pair
, And tuple-like Objects -
P2321R2
zip
, completed by implementing: -
P2374R4 #3561
views::cartesian_product
- P2540R1 Empty Product For Certain Views
-
P2572R1 #3629
std::format
Fill Character Allowances - P2609R3 #3486 Relaxing Ranges Just A Smidge
-
P2614R2 #3482 Deprecating
float_denorm_style
,numeric_limits::has_denorm
,numeric_limits::has_denorm_loss
-
P2652R2 #3542 Disallowing User Specialization Of
allocator_traits
-
P2655R3 #3513
common_reference_t
Ofreference_wrapper
Should Be A Reference Type -
P2736R2 #3556 Referencing The Unicode Standard
-
<format>
now understands Unicode 15.
-
- P2770R0 #3466 Stashing Stashing Iterators For Proper Flattening
-
P1467R9 #3583 Extended Floating-Point Types
- Merged partial C++23 features:
- Merged LWG issue resolutions:
-
LWG-2195 #3506 Missing constructors for
match_results
-
LWG-2309 #3469
mutex::lock()
should not throwdevice_or_resource_busy
- LWG-2381 #3364 Inconsistency in parsing floating point numbers
-
LWG-3204 #3494
sub_match::swap
only swaps the base class -
LWG-3655 #3495 The
INVOKE
operation andunion
types -
LWG-3677 #3396 Is a cv-qualified
pair
specially handled in uses-allocator construction? - LWG-3720 #3511 Restrict the valid types of arg-id for width and precision in std-format-spec
-
LWG-3733 #3496
ranges::to
misusescpp17-input-iterator
-
LWG-3734 #3503 Inconsistency in
inout_ptr
andout_ptr
for empty case -
LWG-3821 #3509
uses_allocator_construction_args
should have overload forpair-like
-
LWG-3833 #3477 Remove specialization
template<size_t N> struct formatter<const charT[N], charT>
-
LWG-3836 #3587
std::expected<bool, E1>
conversion constructorexpected(const expected<U, G>&)
should take precedence overexpected(U&&)
withoperator bool
-
LWG-3847 #3479
ranges::to
can still return views -
LWG-3851 #3517
chunk_view::
inner-iterator
missing customiter_move
anditer_swap
-
LWG-3860 #3480
range_common_reference_t
is missing -
LWG-3862 #3471
basic_const_iterator
'scommon_type
specialization is underconstrained -
LWG-3865 #3476 Sorting a range of
pair
s- This can be a source-breaking change in unusual scenarios.
-
LWG-3869 #3487 Deprecate
std::errc
constants related to UNIX STREAMS -
LWG-3870 #3475 Remove
voidify
-
LWG-3872 #3470
basic_const_iterator
should have customiter_move
-
LWG-3875 #3485
std::ranges::repeat_view<T, IntegerClass>::
iterator
may be ill-formed -
LWG-3877 #3504 Incorrect constraints on
const
-qualified monadic overloads forstd::expected
-
LWG-3887 #3589 Version macro for
allocate_at_least
-
LWG-2195 #3506 Missing constructors for
- Fixed bugs:
- Fixed the
ios_base
constants (e.g.ios_base::binary
,ios_base::failbit
,ios_base::hex
) to have the correct bitmask types. #3405 - Fixed compiler errors found with Clang 16. #3483
- Fixed
<ranges>
to avoid using list-initialization when the difference between braces and parentheses is observable. #3493 - Fixed
pmr::unsynchronized_pool_resource
to respectpmr::pool_options::max_blocks_per_chunk
when it's smaller than the default initial number of blocks per chunk. #3510 - Fixed technically undefined behavior in
<regex>
and<sstream>
found by Clang/LLVM's Undefined Behavior Sanitizer (UBSan). #3452 - Fixed compiler errors when calling
ranges::equal
with ranges involvingviews::iota
. #3551 - Fixed the STL's iterator unwrapping machinery to avoid requiring a
_Prevent_inheriting_unwrap
typedef. #3566 - Fixed spurious warnings from Clang's
-Wzero-as-null-pointer-constant
when comparing the spaceship operator's return types (partial_ordering
,weak_ordering
,strong_ordering
) with literal0
. #3581 - Fixed
bind()
function objects to have constrained function call operators, so they interact properly withis_invocable
and related scenarios. #3577 - Reverted #2654 (which affected
<future>
's use of<ppltasks.h>
in Desktop XAML apps) because it introduced anole32.dll
dependency that broke multiple scenarios. #3607- We backported this revert to VS 2022 17.6.
- Fixed
views::cartesian_product
to avoid compiler errors in pathological scenarios. #3609 - Fixed incorrect results for ranges larger than 4 GB passed to the vectorized implementations of
min_element()
,max_element()
, andminmax_element()
. #3619 - Added a compiler bug workaround for MSVC in
shared_ptr
'soperator<=>
. #3647- This avoids compiler errors when comparing
shared_ptr<const int>
toshared_ptr<void>
.
- This avoids compiler errors when comparing
- Added a space to
chrono::ambiguous_local_time
's message to exactly match the Standard. #3650 - Fixed compiler errors when formatting unusual
chrono::duration
types. #3649 - Fixed
optional::transform()
to avoid terminating when the callable object throws an exception. #3668 - Fixed
<charconv>
floating-pointfrom_chars()
to correctly handle two scenarios involving exponents with large absolute values. #3670 - Fixed iostreams floating-point parsing to produce correct results for many different scenarios. #3364
- Fixed compiler errors when importing the Standard Library Modules and calling
typeid(T).name()
. #3677 - Fixed some nasty corner cases in
cartesian_product_view
. #3678 - Fixed some issues with parsing numbers with grouping separators. #3684
- Fixed a bug that could result in
unordered_meow
containers allocating too few buckets. #3687
- Fixed the
- Improved performance:
- Slightly optimized
mutex
andrecursive_mutex
construction by avoiding a Windows API call. #3522 - Slightly optimized
unique_ptr
move assignment by avoiding an unnecessary branch. #3540 - Optimized
chrono::time_zone::to_sys
andchrono::time_zone::to_local
, with a speedup of approximately 3x (times, not percent). #3579 - Optimized
type_index::operator<=>
to avoid calling the comparison function twice. #3600 - Inserted the
VZEROUPPER
instruction at the end of every AVX2 codepath in the STL's vectorized algorithms, improving performance in non-optimized debug mode when the compiler doesn't automatically insert this instruction. #3630 - Optimized the constructors
system_error(error_code)
andsystem_error(int, const error_category&)
. #3635
- Slightly optimized
- Improved throughput:
-
<optional>
and<variant>
now include fewer headers. #3624 - Moved internal machinery into
<regex>
where it's needed. #3625 - C++20
<chrono>
now avoids including<algorithm>
. #3626 -
<compare>
now avoids including<bit>
. #3627 - Refactored a central internal header so that the rest of the STL includes fewer headers and provides less machinery beyond what's required. #3623 #3654
- Common source-breaking impact:
- Need to include
<cstdlib>
forexit
,quick_exit
, etc. - Need to include
<initializer_list>
forinitializer_list
.- Sometimes
initializer_list
is used implicitly when only braces appear in the source code.
- Sometimes
- Need to include
<functional>
forunary_function
andbinary_function
.- Note that
unary_function
andbinary_function
were deprecated in C++11 and removed in C++17, so it's best to stop using them completely.
- Note that
- Need to include
- Uncommon source-breaking impact:
- Need to include
<memory>
foraddressof
. - Need to include
<functional>
forless
,less_equal
,greater
,greater_equal
,equal_to
,not_equal_to
,plus
,minus
, andmultiplies
.
- Need to include
- Common source-breaking impact:
- When the STL needs to call
swap
via Argument-Dependent Lookup, it now does so directly; the internal helper function_Swap_adl
has been removed. #3700
-
- Enhanced behavior:
- Silenced CodeQL warnings. #3489 #3585
- Silenced occurrences (in
bitset::reference
and test code) of MSVC's new off-by-default warning C5267 for deprecated implicit copy constructors/assignment operators. #3497 - Enabled
<source_location>
for Clang. #3584 - Removed the non-Standard
xtime
type from<chrono>
. #3594 - Added
static_assert
s to containers, container adaptors, andallocator
to improve the error messages when they're given non-object types. #2436 #3660-
allocator<void>
is still permitted as a special case.
-
- Improved test coverage:
- Added test coverage with Clang/LLVM's Undefined Behavior Sanitizer (UBSan). #3452
- Added more tests for
views::empty
,views::iota
,views::istream
,views::repeat
, andviews::single
. #3553 - Fixed nonconformant code in the test for Standard Library Header Units and Modules. #3588
- Added test coverage for C++23's customization point objects. #3610
- Added more tests for
ranges::ref_view
,ranges::subrange
,views::common
,views::filter
,views::join
,views::reverse
, andviews::transform
. #3612
- Code cleanups:
- Removed many compiler (and CMake) bug workarounds. #3490 #3499 #3651 #3711
- Various cleanups (described in detail in the PRs, not repeated here). #2116 #3406 #3523 #3524 #3525 #3526 #3527 #3528 #3529 #3530 #3531 #3532 #3533 #3539 #3543 #3547 #3598 #3633 #3639 #3658
- Removed comments that were citing proposed resolutions for LWG issues, now that those issues have been officially resolved by the February 2023 meeting. #3554
- Simplified code by calling
fill_n()
instead offill()
when possible. #3578
- Improved documentation:
- Added documentation about the STL's import library. #2141
- Infrastructure improvements:
- The internal test runner now understands compile-only tests and
libcxx/expected_results.txt
. Consequently, (1) compile-only tests (test.compile.pass.cpp
) no longer need a redundantint main() {} // COMPILE-ONLY
, and (2) we no longer need to redundantly updatelibcxx/skipped_tests.txt
(which has been removed) identically tolibcxx/expected_results.txt
. #3484 - Enforced the usage of only core headers when building the STL's import library. #3621
- Updated dependencies. #3490 #3651 #3711
- Updated build compiler to VS 2022 17.7 Preview 1 (17.6 now required).
- Updated Clang to 16.0.1 (now required).
- Updated CMake to 3.26.0 (now required).
- Updated Python to 3.11.3.
- Updated Boost.Math to 1.82.0. #3657
- The internal test runner now understands compile-only tests and
- Updated
_MSVC_STL_UPDATE
. #3518 #3643 #3680