vs-2022-17.6
版本发布时间: 2024-03-09 13:28:38
microsoft/STL最新发布版本:vs-2022-17.11(2024-08-15 19:47:14)
- Merged C++23 features:
-
P1223R5 #3268
ranges::find_last
,ranges::find_last_if
,ranges::find_last_if_not
-
P2167R3 #3258 Improving
boolean-testable
Usage -
P2278R4 #3187 #3234
cbegin
Should Always Return A Constant Iterator - P2404R3 #3345 Move-Only Types For Comparison Concepts
-
P2467R1 #3065
ios_base::noreplace
: Exclusive Mode Forfstream
s -
P2474R2 #3142
views::repeat
-
P2505R5 #3361 Monadic Functions For
expected
-
P2588R3 #3455
barrier
's Phase Completion Guarantees - P2602R2 #3215 Poison Pills Are Too Toxic
-
P2711R1 #3451 Making Multi-Param Constructors Of Views
explicit
-
P1223R5 #3268
- Merged partial C++23 features:
- Merged LWG issue resolutions:
-
LWG-3515 #3236 [stacktrace.basic.nonmem]:
operator<<
should be less templatized -
LWG-3545 #3242
std::pointer_traits
should be SFINAE-friendly -
LWG-3594 #3276
inout_ptr
- inconsistentrelease()
in destructor -
LWG-3629 #3272
make_error_code
andmake_error_condition
are customization points -
LWG-3646 #3261
std::ranges::view_interface::size
returns a signed type -
LWG-3717 #3266
common_view::end
should improverandom_access_range
case -
LWG-3736 #3318
move_iterator
missingdisable_sized_sentinel_for
specialization -
LWG-3737 #3320
take_view::
sentinel
should provideoperator-
-
LWG-3743 #3269
ranges::to
'sreserve
may be ill-formed -
LWG-3746 #3265
optional
's spaceship withU
with a type derived fromoptional
causes infinite constraint meta-recursion -
LWG-3769 #3459
basic_const_iterator::operator==
causes infinite constraint recursion -
LWG-3772 #3462
repeat_view
's piecewise constructor is missing preconditions -
LWG-3778 #3332
vector<bool>
missing exception specifications -
LWG-3785 #3319
ranges::to
is over-constrained on the destination type being a range -
LWG-3798 #3359 Rvalue reference and
iterator_category
-
LWG-3810 #3421 CTAD for
std::basic_format_args
-
LWG-3823 #3231 Unnecessary precondition for
is_aggregate
-
LWG-3848 #3410
slide_view
missingbase
accessor -
LWG-3850 #3423
views::as_const
onempty_view<T>
should returnempty_view<const T>
-
LWG-3853 #3468
basic_const_iterator<volatile int*>::operator->
is ill-formed
-
LWG-3515 #3236 [stacktrace.basic.nonmem]:
- 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 linker errors when using
time_put<wchar_t>
from the Standard Library Modules. #3232 - Fixed another unintentionally dllexported symbol in the import library. #3233
- This would emit a spurious message "Creating library
meow.lib
and objectmeow.exp
" (while buildingmeow.exe
) when using<stacktrace>
or importing the Standard Library Modules.
- This would emit a spurious message "Creating library
- Fixed a binary compatibility break in
basic_string
, which could lead to missing null terminators causing crashes and other runtime misbehavior, when linking code that was built with different versions of the STL. #3235- This ABI break was introduced by #1735 activating the Small String Optimization for
constexpr
basic_string
in VS 2022 17.4. - The affected scenarios involved mixing VS 2022 17.3 (or earlier) with VS 2022 17.4 (or later, until this fix).
- We backported this fix to VS 2022 17.4.5 and VS 2022 17.5.
- This ABI break was introduced by #1735 activating the Small String Optimization for
- Fixed a binary compatibility break in
ppltasks.cpp
poweringstd::async()
, which could lead to crashes caused by aninvalid_operation
exception slamming intonoexcept
. #3255- This ABI break was introduced by #2654, and appeared in VS 2022 17.4 when the VCRedist was "unlocked".
- The affected scenarios involved building with VS 2015 (or possibly early versions of VS 2017), using "Single-Threaded Apartments", and running on an end user's machine with the VS 2022 17.4 VCRedist installed.
- We backported this fix to VS 2022 17.4.5 and VS 2022 17.5.
- Fixed incorrect results from
find()
,count()
,ranges::find()
, andranges::count()
. #3247- This fixed a regression that was introduced by #2434 in VS 2022 17.3.
- The affected scenarios involved mixing certain signed and unsigned types; for example, finding/counting occurrences of the
int
-1
in a range ofunsigned int
elements should consider the element0xFFFF'FFFFu
to be equal (due to C++'s usual arithmetic conversions), but it was incorrectly considered to be non-equal. - We backported this fix to VS 2022 17.4.5 and VS 2022 17.5.
- Fixed the visualizer for
optional<T>
to work whenT
has a custom visualizer. #3243 - Fixed compiler warnings when passing
long double
tocopysign()
. #3253 - Re-enabled ASan (Address Sanitizer) annotations in
<string>
after fixing significant bugs. #3164- Also fixed ASan annotations in
<vector>
that were failing whenpmr::vector
was used withpmr::monotonic_buffer_resource
on x86.
- Also fixed ASan annotations in
- Fixed compiler errors when passing
ranges
types tostd::copy()
. #3270 - Fixed
shared_future<void>
's move assignment operator to benoexcept
as required by the Standard. #3284 - Fixed Clang compiler errors involving intrinsics by including
<intrin.h>
, which is a header that Clang recognizes and supports. #3285 - Fixed
numeric_limits
to correctly report thatis_signed
istrue
for the STL's internal 128-bit signed-integer-class type. #3291 - Fixed
<stacktrace>
to correctly passSYMOPT_FAIL_CRITICAL_ERRORS
to the Windows API. #3292 - Fixed
<charconv>
(and headers that include it, like<chrono>
and<format>
) to avoid emitting warning C4365 "signed/unsigned mismatch" when being compiled with/J
. #3295-
Note: We strongly discourage any use of the
/J
compiler option, as it's a recipe for One Definition Rule violations and it doesn't improve Standard conformance.
-
Note: We strongly discourage any use of the
- Fixed
ranges::cbegin
,ranges::cend
,ranges::crbegin
,ranges::crend
, andranges::cdata
to behave like their non-const
counterparts when given array rvalues. #3316 - Added compiler bug workarounds:
- Fixed
constexpr
basic_string
to correctly start the lifetimes of its elements, avoiding compiler errors. #3334 - Fixed
views::istream
constraints to precisely follow the Standard. #3335 - Implemented C++17's parallel specialized
<memory>
algorithms. #3145 - Fixed
vector<bool, Alloc>
on 32-bit platforms with 64-bitdifference_type
s to support storing more than 232 bits. #3342 - Fixed a compiler error when calling
ranges::prev
on aniota_view
iterator in debug mode. #3356 - Fixed
ranges::minmax
to avoid moving from an element twice when called with a single-element range ofmove_iterator
s. #3366 - Fixed a minor conformance issue in the
std.ixx
Standard Library Module. #3373- When
module;
introduces a global module fragment, it is required to be the first thing in the file other than comments, although MSVC doesn't enforce this rule yet.
- When
- Changed the STL's usage of a compiler-specific custom attribute to defend against macros. #3380
- Fixed Clang
-Wdeprecated
warnings that said "out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated". #3381 - Changed
vformat_to()
to instantiate its machinery in a lazier way. #3403- When merely including
<format>
or<chrono>
, this avoids instantiating dynamic initializers for facet IDs, and improves throughput slightly.
- When merely including
- Fixed linker errors when using
- Improved performance:
- Avoided constructing unnecessary
string
s inlocale::operator==()
. #3250 - Activated
count()
's vectorized implementation for more eligible iterators in C++14/17 modes. #3262 - Activated the vectorized implementations of
find()
,count()
,ranges::find()
, andranges::count()
for more scenarios involving pointer elements. #3267 - Optimized
<atomic>
for ARM64, massively improving load-acquire and store-release (measured 14.1x to 23.8x speedups - times, not percent) and significantly improving sequentially consistent stores (measured 1.58x speedup). #3399 -
ranges::find
now callsmemchr()
in more situations (when the vectorized implementation isn't available). #3386
- Avoided constructing unnecessary
- Improved throughput:
- Enhanced behavior:
- The STL now supports
/clr
for C++11 multithreading (mutex
,condition_variable
,future
, etc.) and C++17 parallel algorithms. Additionally, the STL now allows/clr
to be used in C++20 mode. #3194 #3201- See tracking issue #3193 for a list of compiler bugs that affect these newly enabled
/clr
scenarios.
- See tracking issue #3193 for a list of compiler bugs that affect these newly enabled
- Added visualizers for
error_category
anderror_code
. #3204 - Improved the output of
source_location::function_name()
. #3206- For example, it now returns
"int __cdecl square(int)"
instead of"square"
.
- For example, it now returns
- When iterator debugging detects bogus usage of an invalidated
vector
iterator, it now displays an assertion message instead of abruptly crashing. #3282 - Changed
<mutex>
to use scope guards instead ofthrow;
, making debugging easier when exceptions are thrown. #3321 - Strengthened the exception specifications for:
- Added
modules/modules.json
to support build systems. #3358 #3488 - Refactored
ranges::minmax
andranges::minmax_element
to detect the single-element case naturally. #3384 - Changed the STL's user-defined literals to be consistently defined as
operator""meow
without a space, because CWG-2521 is deprecating the formoperator"" woof
with a space. #3453
- The STL now supports
- Improved documentation:
- Clarified the error message when including the internal header
<__msvc_cxx_stdatomic.hpp>
in C mode. #3192
- Clarified the error message when including the internal header
- Improved test coverage:
- Enabled
<stdatomic.h>
test coverage for Clang. #3186 - Updated the modules tests after a compiler bugfix for
source_location
. #3339 - Added more tests for
views::elements
. #3350 - Updated our LLVM submodule reference, including new tests. #3344 #3357
- Added more tests for
views::drop
,views::drop_while
,views::take
, andviews::take_while
. #3390
- Enabled
- Code cleanups:
- Removed compiler bug workarounds. #3202 #3288 #3351 #3350
- Removed comments that were citing proposed resolutions for LWG issues, now that those issues have been officially resolved by the November 2022 and February 2023 meetings. #3238 #3461
- Improved consistency in preprocessor comments. #3208
- Simplified a line in
experimental::filesystem::recursive_directory_iterator::operator++()
. #3279 - Various cleanups (described in detail in the PRs, not repeated here). #3293 #3300
- Removed unused internal machinery. #3299
- Simplified types by defaulting some of their special member functions:
- Changed more temporary objects to be constructed with braces instead of parentheses. #3277
- Updated comments after a compiler bug was fixed. #3394
- Updated tests and separately compiled sources to directly use the
[[nodiscard]]
attribute. #3397 - Updated notes for skipped tests in the
libcxx
test suite. #3464
- Infrastructure improvements:
- Added GitHub Actions to automatically add PR cards to the Code Reviews project. #3393
- Fixed the build system to properly pass options when assembling the "alias objects". #3402
- Updated dependencies. #3202 #3288 #3340 #3351 #3467
- Updated build compiler to VS 2022 17.5 Preview 6 (now required).
- Updated CMake to 3.25 (now required).
- Updated Python to 3.11.2.
- Updated Boost.Math to 1.81.0. #3312
- Updated
_MSVC_STL_UPDATE
. #3191 #3264 #3362 #3395