vs-2022-17.2
版本发布时间: 2024-03-09 13:25:42
microsoft/STL最新发布版本:vs-2022-17.11(2024-08-15 19:47:14)
- Merged C++20 Defect Reports:
- Merged C++23 features:
- Merged LWG issue resolutions:
-
LWG-2762 #2376
unique_ptr
operator*()
should benoexcept
-
LWG-2774 #2098
std::function
construction vs assignment -
LWG-3146 #2409 Excessive unwrapping in
std::ref
/cref
-
LWG-3392 #2421
ranges::distance()
cannot be used on a move-only iterator with a sized sentinel -
LWG-3470 #2414
convertible-to-non-slicing
seems to reject valid case -
LWG-3471 #2567
polymorphic_allocator::allocate
does not satisfy Cpp17Allocator requirements -
LWG-3480 #2340
directory_iterator
andrecursive_directory_iterator
are not C++20 ranges -
LWG-3519 #2208 Incomplete synopses for
<random>
classes -
LWG-3543 #2424 Definition of when
counted_iterator
s refer to the same sequence isn't quite right -
LWG-3557 #2406 The
static_cast
expression inconvertible_to
has the wrong operand -
LWG-3563 #2426
keys_view
example is broken -
LWG-3574 #2410
common_iterator
should be completelyconstexpr
-able -
LWG-3580 #2417
iota_view
'siterator
's binaryoperator+
should be improved -
LWG-3589 #2425 The
const
lvalue reference overload ofget
forsubrange
does not constrainI
to becopyable
whenN == 0
-
LWG-3590 #2404
split_view::base() const &
is overconstrained -
LWG-3591 #2411
lazy_split_view<input_view>::
inner-iterator
::base() &&
invalidates outer iterators -
LWG-3592 #2411
lazy_split_view
needs to check the simpleness ofPattern
-
LWG-3593 #2448 Several iterators'
base() const &
andlazy_split_view::
outer-iterator
::value_type::end()
missingnoexcept
-
LWG-3595 #2410 Exposition-only classes
proxy
andpostfix-proxy
forcommon_iterator
should be fullyconstexpr
-
LWG-3598 #2560
system_category().default_error_condition(0)
is underspecified -
LWG-3610 #2542
iota_view::size
sometimes rejects integer-class types -
LWG-3612 #2586 Inconsistent pointer alignment in
std::format
-
LWG-3618 #2566 Unnecessary
iter_move
fortransform_view::iterator
-
LWG-3621 #2543 Remove feature-test macro
__cpp_lib_monadic_optional
-
LWG-3648 #2587
format
should not printbool
with'c'
-
LWG-3654 #2528
basic_format_context::arg(size_t)
should benoexcept
-
LWG-3657 #2564
std::hash<std::filesystem::path>
is not enabled -
LWG-3660 #2549
iterator_traits<common_iterator>::pointer
should conform to[iterator.traits]
-
LWG-3661 #2544
constinit atomic<shared_ptr<T>> a(nullptr);
should work
-
LWG-2762 #2376
- 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 Clang compiler errors when using
ranges::join_view
. #2352 - Fixed several runtime correctness bugs in
std::string
. #2305 - Fixed a memory leak affecting a specific scenario in P0408R7 Efficient Access To
basic_stringbuf
's Buffer. #2361 - Each call to
ranges::clamp
now correctly performs at most three projections. #1898 - The STL no longer rejects Clang in CUDA mode, nor the
cl /showIncludes /D__CUDACC__ ...
command used by CUDA's msbuild integration to gather dependencies. #2075 - Fixed
allocator::is_always_equal
to be deprecated, not removed, in C++20 mode. (It was deprecated by LWG-3170.) #2423 - Fixed
begin()
/end()
crashing for emptyvalarray
s, which also affected range-based for-loops. #2435 - Fixed regression in
ranges::distance
(from LWG-3392 which brokeranges::distance(some_array, s)
) by speculatively implementing LWG-3664. #2522 - Fixed
basic_string::resize_and_overwrite()
to no longer emit "warning C4018: signed/unsigned mismatch" when given certain user-defined function objects. #2525 - Increased
__cpp_lib_concepts
to its final value for C++20,202002L
. #2559- It should have been updated in VS 2019 16.6 when P1964R2 "Replacing
boolean
Withboolean-testable
" was implemented by #565. The presence of that release (or any later release) can be detected by inspecting our implementation-specific macro_MSVC_STL_UPDATE
. Coincidentally, the value of_MSVC_STL_UPDATE
for VS 2019 16.6 was also202002L
.
- It should have been updated in VS 2019 16.6 when P1964R2 "Replacing
- Fixed numerous tiny bugs discovered by the
libcxx
test suite. #2499 - Fixed a bug in
<format>
that sporadically caused incorrect output when formatting floating-point values inhex
orscientific
notation with extremely large precisions. #2569 - Fixed a bug in
<charconv>
from_chars()
float
tiebreaking that produced incorrect results. This affected decimal strings that were at the exact midpoint of consecutivefloat
values, within a narrow range (the smallest and largest affected values were"32768.009765625"
and"131071.98828125"
), where the tiebreaker rule wanted to round to "even" and "even" happened to be "down", but the implementation incorrectly rounded "up". (double
was unaffected.) #2366 -
promise<T>
now compiles when!is_default_constructible_v<T>
. #2568 - Moving from an
optional<const T>
now behaves like moving from aconst T
: it selectsT
's copy constructor. #2460 - Fixed a bug in
<format>
that incorrectly acceptedvolatile
arguments; the Standard currently says that they should be rejected. #2579
- Fixed Clang compiler errors when using
- Improved performance:
- Optimized
rotl()
androtr()
in<bit>
for 32-bit and 64-bit integers by using compiler intrinsics. #2369 -
reverse_copy()
's vectorized implementation is now activated (for eligible types) in all Standard modes. Previously, only the C++14/17 modes activated this optimization; C++20/23 modes unintentionally used the plain implementation (correct but slower). #2416 - Improved codegen for
gcd()
andlcm()
. #2343 - Improved
<format>
performance when the execution character set is self-synchronizing. For example, code page 1252 "ANSI Latin 1; Western European (Windows)" activates this optimization. The/utf-8
compiler option also activates this optimization. #2493 - Improved codegen for
generate_canonical
. #2498
- Optimized
- Improved throughput:
- Enhanced behavior:
- Fixed new warnings emitted by Clang 13:
-Wdeprecated-copy
(in product and test code) and-Wunused-but-set-variable
(in test code only). #2266 - Added ASan (Address Sanitizer) annotations to
<vector>
, allowing additional errors to be detected. #2071 #2420 #2464 #2508 - Added a debug assertion to
allocator::deallocate()
; passing a null pointer with a non-zero size is an error. #2412 - For supply chain security, replaced checked-in OBJ files (generated by an internal tool
aliasobj
) with the linker's/ALTERNATENAME
option (which is strictly more reproducible, although not officially documented). #2381- In certain scenarios involving separately compiled third-party libraries, this can cause "unresolved external symbol" linker errors. See issue #2655 for an explanation and workarounds.
- Fixed new warnings emitted by Clang 13:
- Improved documentation:
- Improved test coverage:
- Code cleanups:
- Removed compiler bug workarounds. #2338 #2351 #2357 #2474 #2496
- Updated test code to directly pass a format string to
printf()
, allowing the compiler to check it. #2346 - Cleaned up clang-formatting. #2356
- Changed the
<charconv>
test headers to use include guards, for closer alignment with libc++. #2372 - Improved the clarity of vectorized algorithm implementations by replacing the magic numbers
27
and78
. #2377 - Improved consistency by always saying
friend constexpr
instead of the reverse order. #2419 - Simplified
<ratio>
's implementation by usingconstexpr
functions instead of template metaprogramming. #2450 - Simplified an internal function for opening files. #2095
- Infrastructure improvements:
- Updated dependencies. #2474 #2496 #2514
- Updated build compiler to VS 2022 17.1 Preview 5 (now required).
- Updated Clang to 13.0.0 (now required).
- Updated CMake to 3.22 (now required).
- Updated Python to 3.10.2.
- Added scripts to set
INCLUDE
,LIB
, andPATH
after building the repo. #2578 - Azure Pipelines now uploads test logs as artifacts, making it easier to investigate test failures when lengthy command lines, compiler output, or runtime output are truncated in the web UI. #2575
- Updated dependencies. #2474 #2496 #2514
- Updated
_MSVC_STL_UPDATE
. #2374 #2455 #2519 #2602