-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Changelog
Stephan T. Lavavej edited this page May 28, 2025
·
2393 revisions
- Upcoming Changes
- VS 2022 17.14 - latest production version, see the VS 2022 Release Notes
- VS 2022 17.13
- VS 2022 17.12
- VS 2022 Changelog
- VS 2019 Changelog
C++23 features generally require the /std:c++23preview
or /std:c++latest
compiler options.
- The STL no longer supports targeting Windows 7 / Server 2008 R2, Windows 8 / Server 2012, and Windows 8.1 / Server 2012 R2:
- Improved the performance of
system_clock::now()
andatomic::wait()
by directly calling APIs that were added in Windows 8. #5432 #5496 - Improved the performance of STL Hardening by using the MSVC
__fastfail
intrinsic that was added in Windows 8, and the Clang__builtin_verbose_trap
intrinsic. #5433 #5458 - Simplified the
<filesystem>
implementation by unconditionally calling APIs that were added in Windows 8. #5434 - Windows 10 / Server 2016 are our minimum supported operating systems. #5510
- Improved the performance of
- Merged C++26 features:
- Merged LWG issue resolutions:
- Fixed bugs:
- Fixed
regex
's behavior:- For the
basic
andgrep
grammars to properly handle^
caret characters. #5165 - For the
basic
andgrep
grammars to properly handle$
dollar characters. #5362 - For the
basic
andgrep
grammars to make backreferences to unmatched capture groups fail to match anything, instead of matching the empty string""
. #5376 - For the
basic
andgrep
grammars to properly handle backslashes inside square-bracket character classes. #5523 - For POSIX grammars to allow a
]
right square bracket at the beginning of a character range. #5364 - For POSIX grammars to avoid resetting matched capture groups. #5377
- For the
ECMAScript
grammar's(?!pattern)
negative lookahead assertions to make capture groups within them always match nothing after the assertions succeed. #5366 - For the
ECMAScript
grammar's\b
word boundary assertion to not match the empty string""
(and inversely for the\B
negative word boundary assertion). #5375 - For the
ECMAScript
grammar's\c
escapes to require the following ControlLetter to be an ASCII alphabetic character. #5524- That is, only
\ca
through\cz
and\cA
through\cZ
are allowed.
- That is, only
- For the
ECMAScript
grammar to reset all capture groups to "unmatched" at the start of each repetition of a loop. #5456 - For the
ECMAScript
grammar to reject bogus groups by throwing aregex_error
with the coderegex_constants::error_badrepeat
, removing the non-Standard coderegex_constants::error_syntax
that was previously used. #5542- That is, only non-capture groups
(?:meow)
and positive/negative lookahead assertions(?=meow)
/(?!meow)
are allowed; other characters following(?
are bogus. Notably, the C++ Standard doesn't support the lookbehind assertions(?<=meow)
/(?<!meow)
that were added in later versions of ECMAScript.
- That is, only non-capture groups
- For the
ECMAScript
,basic
,grep
, andawk
grammars to properly handle escape sequences. #5380- POSIX grammars now accept
\]
as an identity escape for a right square bracket. #5399
- POSIX grammars now accept
- For capture groups to follow ECMAScript's depth-first and POSIX's leftmost-longest matching rules. #5218
- Removed unnecessary code for POSIX's leftmost-longest rule, reducing stack space consumption. #5405
- For empty matches to follow ECMAScript's and POSIX's slightly different rules. #5494
- For negated character class escapes (
\D
for non-digits,\S
for non-whitespace,\W
for non-words) inside square-bracket character classes when matching against Unicode characters. #5403 #5487 - For combinations of character class escapes inside square-bracket character classes (like
[\w\s]
for words and whitespace) when matching against Unicode characters. #5438 - For character ranges with
regex_constants::collate
to follow the locale's collation order. #5238 - For collating symbols and equivalence classes. #5392 #5444
- For small character ranges containing U+00FF and U+0100. #5437
- For the
- Fixed
collate<wchar_t>
to follow the locale's collation order when compiling with/Zc:wchar_t-
(makingwchar_t
a non-Standard typedef forunsigned short
) and linking to the STL dynamically (with/MD
or/MDd
). #5361 - Fixed how
collate::do_transform()
handles wrongly encoded input. #5431 - Fixed
collate::do_hash()
to return equal hashes for strings that collate as equivalent. #5469 - Fixed
ranges::enable_view
to correctly reportfalse
forranges::view_interface
itself. #5369 #5407 - Fixed
<filesystem>
status functions to avoid failing for invalid paths when the current directory is a network path. #5381 - Fixed compiler errors in
repeat_view
's piecewise constructor for certain scenarios. #5388 - Fixed compiler errors in
constexpr
copy()
forvector<bool>
. #5347- This fixed a regression that was introduced by #3353 in VS 2022 17.9.
- Fixed the
barrier
constructor's exception specification to be conditionally "strengthened", instead of unconditionally. #5398 - Fixed heap-use-after-free bugs in our undocumented/quasi-supported
_HAS_EXCEPTIONS=0
mode when constructingsystem_error
,chrono::ambiguous_local_time
, andchrono::nonexistent_local_time
. #5406 - Fixed compiler errors when passing
volatile
ranges tobasic_string
'sfrom_range
constructor andappend_range()
,assign_range()
,insert_range()
, andreplace_with_range()
member functions. #5409 - Fixed
nth_element()
andranges::nth_element
to have worst-case linear complexity, instead of quadratic. #5100 - Fixed compiler errors when passing iterators with unusual integer-class difference types to vectorized algorithms. #5471
- Fixed
destroy()
,destroy_at()
,destroy_n()
,ranges::destroy
,ranges::destroy_at
, andranges::destroy_n
to destroy objects during constant evaluation even when they're trivially destructible. #5449 - Fixed
num_get::do_get()
forbool
to properly handle bad digit groupings. #5476 - Fixed
thread::hardware_concurrency()
to correctly report the total number of logical processors when more than 64 are available, for both single-socket and multi-socket machines. #5459 - Fixed
<mdspan>
'slayout_stride::mapping<E>::is_exhaustive()
to correctly handle unusual extents. #5477 - Fixed
reverse_copy()
andranges::reverse_copy
being improperly vectorized forpair<T&, U&>
on 32-bit targets (where suchpair
s are 8 bytes). #5528- This fixed a regression that was introduced by #804 in VS 2019 16.8.
- Fixed
- Improved performance:
- Started using
[[msvc::no_unique_address]]
as a space optimization in several C++23 components. #4960 - Added vectorized implementations of:
-
basic_string::find_first_not_of()
andbasic_string::find_last_not_of()
for one character. #5102 -
basic_string::find_first_not_of()
andbasic_string::find_last_not_of()
for multiple characters. #5206 -
adjacent_find()
andranges::adjacent_find
. #5331 -
unique()
andranges::unique
. #5092 #5363 -
search_n()
andranges::search_n
for small values of n. #5352 -
remove_copy()
,ranges::remove_copy
,unique_copy()
, andranges::unique_copy
. #5355 -
is_sorted_until()
andranges::is_sorted_until
. #5420 #5540 -
search()
,ranges::search
,default_searcher
,find_end()
, andranges::find_end
, for 4-byte and 8-byte elements. #5484 #5519- They were vectorized for 1-byte and 2-byte elements in VS 2022 17.13.
-
rotate()
andranges::rotate
. #5502 #5525
-
- Improved the vectorized implementations of:
-
reverse_copy()
andranges::reverse_copy
. #5493
-
- Used Clang's builtin
__is_trivially_equality_comparable
to improve the performance ofequal()
,ranges::equal
, and many vectorized algorithms for more types. #5527 - Optimized
search_n()
andranges::search_n
for n=1 to internally callfind()
andranges::find
. #5346 - Improved codegen for
has_single_bit()
, especially whenpopcount()
intrinsics are unconditionally available. #5367 #5534- For example, x86/x64 with
/arch:AVX
and ARM64 can unconditionally usepopcount()
intrinsics.
- For example, x86/x64 with
- Optimized
poisson_distribution
's constructor by avoiding unnecessary work. #5411 - Implemented an exponential speedup (yes, literally) for
minstd_rand
andminstd_rand0
'sdiscard()
member function. #5412 - Improved
linear_congruential_engine
performance by using our modern internal implementation of 128-bit integers. #5436 #5473 - Improved performance for
regex
matching:- Avoided quadratic complexity when a
regex
starts with a?
question mark quantifier or several alternatives. #5457 - Significantly improved performance when a
regex
starts with a+
plus quantifier (or{min,}
or{min,max}
quantifiers requiring at least 1 repetition). #5509 - Avoided unnecessary allocations when a
regex
contains no capture groups. #5518 - Avoided generating unnecessary "if" nodes with a single branch, improving performance for all
regex
patterns. #5539
- Avoided quadratic complexity when a
- Significantly improved performance for
chrono::tzdb::locate_zone()
by using binary searches for time zone names. #5548
- Started using
- Enhanced behavior:
- Used a new Clang compiler intrinsic to implement
is_scoped_enum
. #5358 - Added debug checks for overlapping ranges in
replace_copy()
,replace_copy_if()
,reverse_copy()
,rotate_copy()
, and theirranges
counterparts. #5495 - Improved
<mdspan>
's debug checks inlayout_stride::mapping<E>
's constructor. #5505 - Avoided compiler warnings in
vector<bool>::max_size()
with the compiler's upcoming implementation of Defect Report P2280R4. #5550
- Used a new Clang compiler intrinsic to implement
- Improved debugger visualization:
- Improved test coverage:
- Updated our LLVM submodule, including new tests. #5349 #5467
- Updated an
iter_rvalue_reference_t
test in response to a compiler change. #5378 - Changed the benchmark build from
/O2 /Ob1
to/O2 /Ob2
, producing more realistic and useful results. #5370 - Fixed sporadic test failures by avoiding excessive compiler memory consumption. #5383
- Added benchmarks for:
- Improved the consistency of how
normal_distribution
is used in benchmarks and tests. #5404 - Improved the runtime performance of the major test for vectorized algorithms. #5425
- Added more test coverage for
search_n()
andranges::search_n
. #5439 #5440 - Increased the consistency of several benchmarks by adding allocators to control alignment. #5443
- Updated the test harness to properly detect the locale name
"Czech_Czechia.1250"
. #5480 - Updated
source_location
test coverage to handle upcoming changes in the EDG front-end used for IntelliSense. #5551
- Improved documentation:
- Code cleanups:
- Simplified the control flow in
ranges::search_n
. #5343 - Simplified the implementation of
regex
quantifiers. #5253 - Removed comments that were citing proposed resolutions for LWG issues, now that those issues have been officially resolved by the November 2024 meeting. #5360
- Removed compiler bug workarounds. #5410
- Significantly cleaned up the implementation of vectorized algorithms. #5429 #5450 #5485 #5532
- Removed an unnecessarily verbose internal macro. #5475
- Removed unnecessary code for constant evaluation in
char_traits::assign()
. #5488 - Various cleanups (described in detail in the PRs, not repeated here). #5498 #5500 #5541
- Simplified the control flow in
- Infrastructure improvements:
- Added ARM64EC stages to Azure Pipelines. #5492 #5517 #5521
- Including an Early Build, benchmarks, and tests.
- Updated dependencies. #5370 #5410 #5478 #5512 #5530
- Updated build compiler to VS 2022 17.14 Preview 7.
- Updated CMake to 3.31 (now required).
- Updated Google Benchmark to 1.9.4.
- Updated Python to 3.13.3.
- Added ARM64EC stages to Azure Pipelines. #5492 #5517 #5521
- Updated
_MSVC_STL_UPDATE
and_MSVC_STL_VERSION
. #5385 #5464
- Merged C++26 features:
- Merged partial C++26 features:
-
P3471R4 #5274 Standard Library Hardening
- Currently disabled by default.
- This can be enabled (for any Standard mode) by defining
_MSVC_STL_HARDENING
to1
project-wide. - As C++26 Contracts are not yet implemented, this defaults to calling
__fastfail()
for hardened precondition violations.
-
P3471R4 #5274 Standard Library Hardening
- Related behavior enhancement:
- Implemented "destructor tombstones" to mitigate use-after-free mistakes. #5318
- Currently disabled by default.
- This can be enabled by defining
_MSVC_STL_DESTRUCTOR_TOMBSTONES
to1
project-wide.
- Implemented "destructor tombstones" to mitigate use-after-free mistakes. #5318
- Merged LWG issue resolutions:
- LWG-3133 #5157 Modernizing numeric type requirements
-
LWG-3886 #5232 Monad mo' problems (in
optional
andexpected
) -
LWG-3899 #5303
co_yield
ing elements of an lvaluegenerator
is unnecessarily inefficient -
LWG-3900 #5150 The
allocator_arg_t
overloads ofgenerator::promise_type::operator new
should not be constrained -
LWG-3918 #5135 #5170
std::uninitialized_move/_n
and guaranteed copy elision -
LWG-3956 #5334
chrono::parse
usesfrom_stream
as a customization point -
LWG-4014 #5132 LWG-3809 changes behavior of some existing
std::subtract_with_carry_engine
code -
LWG-4027 #5221
possibly-const-range
should prefer returningconst R&
-
LWG-4084 #5151
std::fixed
ignoresstd::uppercase
-
LWG-4112 #5152
has-arrow
should requireoperator->()
to beconst
-qualified -
LWG-4119 #5220
generator::promise_type::yield_value(ranges::elements_of<R, Alloc>)
's nestedgenerator
may be ill-formed -
LWG-4124 #5155 Cannot format
zoned_time
with resolution coarser than seconds -
LWG-4135 #5131 The helper lambda of
std::erase
forlist
should specify return type asbool
- LWG-4140 #5129 Useless default constructors for bit reference types
-
LWG-4144 #5201 Disallow
unique_ptr<T&, D>
-
LWG-4169 #5128
std::atomic<T>
's default constructor should be constrained -
LWG-4172 #5337
unique_lock
self-move-assignment is broken
- 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
system_category().message()
to prefer US English, followed by the system locale, with an ultimate fallback ofFormatMessageA
's behavior fordwLanguageId == 0
. #5104- This is consistent with
generic_category().message()
(which always returns US English in our implementation) and has the best chance of returning something intelligible instead of"unknown error"
or"???"
. - This fixed a regression that was introduced by #2669 in VS 2022 17.3.
- This is consistent with
- Fixed
regex
's behavior:- To reject bogus character class ranges like
R"([\d-e])"
. #5158 - For negated character class escapes (
\D
for non-digits,\S
for non-whitespace,\W
for non-words) when matching against Unicode characters: - For character ranges in case-insensitive mode. #5164
- For the
basic
grammar to parse a single digit for backreferences. #5167 - For its internal buffers to grow geometrically. #5175
- For the special character
.
(dot). #5192 - For its constructor to accept (null, zero) arguments. #5211
- To reject bogus character class ranges like
- Fixed
filesystem::equivalent()
to return correct results when shared folders are involved. #5130 - Fixed
chrono::weekday
's constructor to avoid integer overflow for extreme inputs. #5156 - Fixed
push_range()
forstack
,queue
, andpriority_queue
to forward the range toc.append_range()
when possible, exactly as depicted in the Standard. #5168 - Fixed code to call
ranges::begin
andranges::end
exactly as depicted in the Standard: - Fixed compiler errors in
range_formatter
involving highly unusual contiguous ranges. #5187 - Fixed heterogeneous lookup for unordered containers to follow the Standard, allowing braced initializer lists to be used as arguments. #5208
- Fixed compiler errors in
views::counted
involving highly unusual types. #5223 - Fixed integer overflow in
this_thread::sleep_for()
with extremely small units (e.g. picoseconds). #5237 - Fixed
basic_string::reserve()
's ASan annotations to detect writes to its unused capacity. #5252 - Fixed how
<format>
handles field width for alternate form general floating-point. #5261 - Fixed compiler errors when constructing a
basic_ispanstream
from a modifiablebasic_string
. #5309- This fixed a regression that was introduced by #4938 in VS 2022 17.13.
- Fixed compiler errors when using
<format>
in a CUDA project, by adding a compiler bug workaround. #5335 - Fixed compiler errors when converting between different specializations of
basic_const_iterator
. #5325
- Fixed
- Improved performance:
- Added vectorized implementations of:
-
basic_string::find()
for a character. #5101
-
- Improved the vectorized implementations of:
-
basic_string::find_first_of()
andbasic_string::find_last_of()
. #5029
-
-
regex_traits::translate()
is now an identity function, as required by the Standard, instead of an expensive locale operation. #5209 - The STL now takes advantage of compiler support for C++23 P1169R4
static operator()
in earlier Standard modes, slightly improving codegen. #5284 #5312 - Optimized the
minstd_rand
andminstd_rand0
random number engines by avoiding constant divisions. #5256 - Slightly improved
move_only_function
's constructors to do less work when setting the object to be empty. #5328
- Added vectorized implementations of:
- Enhanced behavior:
-
std::expected
,std::unexpected
, and all STL exception types are now marked[[nodiscard]]
. #5174- This affects all user-defined functions returning these types by value. It also affects any directly constructed temporaries that are immediately discarded.
- Deprecated the non-Standard
locale::empty()
static member function. #5197 - Changed the STL to avoid using
is_trivial
, which is being deprecated in C++26. #5202 - Improved the STL's debug checks with better messages and fewer branches. #5270
-
- Improved debugger visualization:
- Improved test coverage:
- Simplified the test harness by dropping
ctest
. Now we always directly invokestl-lit.py
. #5169 - Improved the test harness to warn only once when a compiler is missing. #5199
- Categorized libcxx test failures. #5231
- Updated our LLVM submodule, including new tests. #5235
- Added test coverage for the ASan annotations in
basic_string::reserve()
andvector::reserve()
. #5241 - Skipped
libcxx
tests in response to a new compiler warning C5321, which warns when the resolution to CWG-1656 affects au8
string literal. #5283
- Simplified the test harness by dropping
- Code cleanups:
- Infrastructure improvements:
- Updated
_MSVC_STL_UPDATE
. #5162 #5217 #5264 #5323
- Merged C++23 features:
- Merged C++23 Defect Reports:
- Fixed bugs:
- Fixed an infinite loop in
deque::shrink_to_fit()
. #4955- This fixed a regression that was introduced by #4091 in VS 2022 17.10.
- Fixed compiler errors when constructing highly unusual
unique_ptr
s (storing fancy pointers) from unspeakably evil relics of the forgotten past. #4922 - Fixed compiler errors when calling
ranges::inplace_merge
with certain combinations of elements, projections, and comparisons. #4927 - Fixed compiler errors in
basic_ispanstream
's constructor andbasic_ispanstream::span()
takingReadOnlyRange&&
with highly unusual types. #4938 - Fixed compiler errors in the highly unusual scenario of calling
basic_string
andbasic_string_view
'sfind_first_of()
family of member functions for program-defined "unicorn" character types. #4951 - Fixed compiler errors when constructing
optional
from highly unusual types. #4961 - Fixed sequence container emplacement functions (e.g.
vector::emplace_back()
) to avoid emitting "warning C5046: Symbol involving type with internal linkage not defined" for highly unusual types. #4963 #4980- This also fixed ODR violations when mixing C++14 with C++17-and-later translation units calling sequence container emplacement functions for any types.
- Fixed ODR violations when mixing C++17 with C++20-and-later translation units calling
list/forward_list::remove/remove_if/unique()
. #4975 - Fixed compiler errors in
variant
's converting constructor and converting assignment operator for certain types. #4966 - Fixed
bitset
's streaming operatoroperator>>(basic_istream<CharT, Traits>&, bitset<N>&)
to use the stream'sTraits
to compare characters. #4970 - Fixed
basic_string
andlist
's internal constructors to avoid disrupting highly unusual scenarios. #4976 - Fixed compiler errors when constructing a
packaged_task
from a move-only function object. #4946 - For Clang
/fp:fast
, fixed<cmath>
and<limits>
to avoid emitting-Wnan-infinity-disabled
warnings, except whennumeric_limits::infinity()
/quiet_NaN()
/signaling_NaN()
are specifically called. #4990 - Fixed
ranges::copy_n
to properly handle negative values of n (as a no-op) when activating ourmemmove()
optimization. #5046- Also fixed our
memmove()
optimization (used bycopy_n()
,ranges::copy_n
, and more) to avoid emitting compiler warnings with certain iterators.
- Also fixed our
- Fixed
filesystem::directory_entry::refresh()
to avoid sporadically failing for nonexistent network paths on Windows 11 24H2. #5077 - Fixed
basic_istream::get()
andbasic_istream::getline()
to never write a null terminator into zero-sized buffers, and to always write a null terminator otherwise. #5073 - Fixed
assign_range()
for sequence containers tostatic_assert
that the container elements are assignable from the range's reference type. #5086 - Fixed compiler errors in various ranges algorithms when used with
views::iota
in certain scenarios. #5091
- Fixed an infinite loop in
- Improved performance:
- Added vectorized implementations of:
-
basic_string::find_first_of()
. #4744 -
basic_string::find_last_of()
. #4934 -
basic_string::find()
for a substring. #5048 -
basic_string::rfind()
for a substring. #5057 -
basic_string::rfind()
for a single character. #5087 -
search()
,ranges::search
, anddefault_searcher
, for 1-byte and 2-byte elements. #4745 -
find_end()
andranges::find_end
, for 1-byte and 2-byte elements. #4943 #5041 #5042 -
bitset
's constructors from strings. #4839 -
remove()
andranges::remove
. #4987
-
- Improved the vectorized implementations of:
- Helped the compiler auto-vectorize:
-
ranges
algorithms now unwrap output iterators, avoiding unnecessary checking. #5015 #5027 - Optimized
bitset
's streaming operators. #5008 - Optimized the newline-printing overloads
println(FILE*)
,println(ostream&)
, and nullaryprintln()
. #4672 - Updated
array
andvector
's spaceship comparison operators to take advantage of the vectorized implementation oflexicographical_compare_three_way()
. #5078 - Extended the "key extraction" optimization in the unique associative containers (both ordered and unordered) to handle more types. #5050
- Optimized
filesystem::symlink_status()
by avoiding unnecessary Windows API calls. #5071
- Added vectorized implementations of:
- Improved throughput:
- Improved C++23 throughput by not including all of
<ostream>
(which drags in<format>
) unless the Standard requires it. #4936 - Improved C++23 throughput of
<queue>
,<stack>
,<stacktrace>
, and<thread>
by not including all of<format>
. #5003 - Moved
system_clock
,high_resolution_clock
, andchrono_literals
from a commonly-included internal header to<chrono>
. #5105- This has source-breaking impact. If you see compiler errors complaining that it doesn't recognize
chrono
types likesystem_clock
or UDLs like1729ms
, you need to include<chrono>
specifically, instead of assuming that headers like<thread>
will drag it in.
- This has source-breaking impact. If you see compiler errors complaining that it doesn't recognize
- Improved C++23 throughput by not including all of
- Enhanced behavior:
- Changed an internal
pair
constructor to beprivate
. #4979 - Fixed a CodeQL warning by replacing a squirrelly
memcpy()
call in thefilesystem
implementation (that was intentionally performing a read overrun) with two cromulentmemcpy()
calls. #4933 - Silenced CodeQL warnings. #4942 #4985 #5072
- Added a visualizer for
system_clock::time_point
. #5005 - Changed some
vector
machinery to use scope guards instead ofthrow;
, making debugging easier when exceptions are thrown. #4977 - Improved
regex_error::what()
's message forregex_constants::error_badbrace
. #5025 - Improved
optional<T>::swap()
'sstatic_assert
messages whenT
isn't both move constructible and swappable. #5065 - Removed
locale::id
's non-Standard constructor fromsize_t
and implicit conversion operator tosize_t
. #5067- For user-visible headers, at least. They remain dllexported for binary compatibility.
- Improved
mutex
assertions to distinguish "unlock of unowned mutex" from "unlock of mutex not owned by the current thread". #5099
- Changed an internal
- Improved test coverage:
- Updated tests to work with Clang 18. #4932 #4937
- Fixed sporadic failures in a
timed_mutex
test. #4973 - Extended CUDA test coverage beyond C++14, adding C++17 and C++20. #4974
- When Python
psutil
is installed, the test harness now supports apriority
parameter, defaulting toidle
. #5032 - Increased the consistency of the
swap_ranges()
benchmark by adding allocators to control alignment. #5043 - Updated our LLVM submodule, including new tests. #5038
- Divided the increasingly large test for vectorized algorithms into smaller parts, extracting
mismatch()
,lexicographical_compare()
, andlexicographical_compare_three_way()
into a separate test. #5063
- Code cleanups:
- Removed compiler bug workarounds. #4939 #4944 #4947 #5017 #5103
- Explicitly marked
packaged_task
's defaulted move constructor and move assignment operator asnoexcept
. #4940 - Various cleanups (described in detail in the PRs, not repeated here). #4945 #5014 #5058
- Refactored internal usage of the
tuple-like
andpair-like
concepts. #4983 - Used
if constexpr
to simplifyeldritch horrors from beyond spacetimelocale facets. #5001 - Simplified control flow in
basic_string::find_first_not_of()
/find_last_not_of()
. #5006 - Refactored the vectorized implementation of
bitset::to_string()
. #5013 - Replaced SFINAE with concepts in C++20-and-later code. #5044
- Improved documentation:
- Removed an inaccurate comment in
list
's move assignment operator. #5024
- Removed an inaccurate comment in
- Infrastructure improvements:
- Build system improvements:
- Removed a workaround in the benchmark build. #4928
- Updated
_MSVC_STL_UPDATE
. #4926 #4994 #5064
- Merged C++26 features:
-
P0952R2 #4740 #4850 A New Specification For
generate_canonical()
- P2407R5 #4743 Freestanding Library: Partial Classes
-
P2833R2 #4743 Freestanding Library:
inout
expected
span
-
P2968R2 #4777 Make
std::ignore
A First-Class Object - P2997R1 #4816 Removing The Common Reference Requirement From The Indirectly Invocable Concepts
-
P0952R2 #4740 #4850 A New Specification For
- Merged C++23 features:
- Merged LWG issue resolutions:
-
LWG-3944 #4784 Formatters converting sequences of
char
to sequences ofwchar_t
-
LWG-4061 #4758 Should
std::basic_format_context
be default-constructible/copyable/movable? -
LWG-4074 #4814
compatible-joinable-ranges
is underconstrained -
LWG-4083 #4786
views::as_rvalue
should reject non-input ranges -
LWG-4096 #4785
views::iota(views::iota(0))
should be rejected -
LWG-4098 #4815
views::adjacent<0>
should reject non-forward ranges -
LWG-4106 #4757
basic_format_args
should not be default-constructible
-
LWG-3944 #4784 Formatters converting sequences of
- 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 static analysis warning C26818 "Switch statement does not cover all cases. Consider adding a 'default' label (es.79)." #4715
-
Note: The STL has always attempted to be
/W4 /analyze
clean, but does not yet attempt to be clean with respect to all additional static analysis rulesets.
-
Note: The STL has always attempted to be
- Fixed
atomic_ref::is_lock_free()
on x64 to returntrue
for 1, 2, 4, 8, and 16 bytes only. #4729 - Fixed
uniform_real_distribution<RealType>{min, max}
to stay within the inclusive-exclusive range[min, max)
and never generate themax
value exactly. #4740 - Fixed
filesystem::weakly_canonical()
to avoid failing on Windows 11 24H2 in certain scenarios. #4844 - Fixed
condition_variable_any::wait_for()
to consistently usesteady_clock
. #4755 - Removed a broken and useless visualizer for
ranges::view_interface
. #4835 - Fixed the visualizer for
move_iterator
to use the updated name of its internal data member. #4836- This fixed a regression that was introduced by #1080 in VS 2019 16.8.
- Fixed
expected
to conditionally delete its copy constructor and copy assignment operator as depicted in the Standard, which affects overload resolution in unusual scenarios. #4837 - Fixed
time_put
/put_time()
to avoid crashing for: - Fixed compiler errors in
ranges::inplace_merge
andranges::minmax
in unusual scenarios. #4841 - Fixed truncation warnings when:
- Improved
array::size()
and<mdspan>
static analysis annotations, fixing warnings in some scenarios. #4856 - Fixed
lexicographical_compare_three_way()
to enforce the Standard's mandate that the comparison returns a comparison category type. #4878 - Fixed compiler errors in the parallel scan algorithms
inclusive_scan()
,exclusive_scan()
,transform_inclusive_scan()
, andtransform_exclusive_scan()
when the intermediate and output types are different. #4701 - Fixed the vectorized implementation of floating-point
ranges::min
,ranges::max
, andranges::minmax
to return correct results for negative zeros. #4734 - Fixed Clang compiler errors for certain
constexpr
variant
scenarios by adding a compiler bug workaround. #4903 - Fixed compiler errors when using
<random>
machinery (e.g.generate_canonical()
,uniform_real_distribution
) via Standard Library Modules or Standard Library Header Units by adding compiler bug workarounds. #4906 - Fixed compiler errors when using
<format>
machinery in user-defined modules by adding compiler bug workarounds. #4919 - Fixed
<format>
to avoid crashing when formatting floating-point values with large precisions combined with the#
(alternate form) orL
(locale-specific form) options. #4907
- Fixed static analysis warning C26818 "Switch statement does not cover all cases. Consider adding a 'default' label (es.79)." #4715
- Improved performance:
- Overhauled
condition_variable
andcondition_variable_any
, improving their performance and simplifying their implementation. #4720- As a result,
condition_variable
,timed_mutex
, andrecursive_timed_mutex
are now trivially destructible.
- As a result,
- Improved the performance of
search()
,find_end()
, and theirranges
forms by removing calls tomemcmp()
that were surprisingly harmful. #4654 #4753 - Improved the ARM64 performance of
popcount()
by using new compiler intrinsics. #4695 #4733 - Further improved the vectorized implementations of:
- Slightly improved the performance of
ranges::min
,ranges::max
, andranges::minmax
for certain iterator types. #4775 - On x86, the STL is now built with
/arch:SSE2
(which is the default) instead of/arch:IA32
. #4741- See
/arch
(x86) on Microsoft Learn.
- See
- Used Clang builtins to improve the performance of
<cmath>
's floating-point comparison functions for mixed types. #4648 - On x64,
atomic_ref<16 bytes>
now always uses the cmpxchg16b instruction. #4751 - Streaming a small
bitset
to abasic_ostream
now avoids dynamically allocating memory. #4818 - Slightly improved performance for Clang ARM64
<atomic>
. #4870 - Updated
char_traits<wchar_t/char16_t>::compare/find/length
,find
, andranges::find
to callwmemcmp/wmemchr/wcslen
when possible, which will improve performance after a future UCRT header update. #4873 #4894 - Optimized equality comparisons for empty
string
s andstring_view
s. #4904
- Overhauled
- Improved throughput:
- Improved
<queue>
and<stack>
throughput by dragging in fewer headers. #4707
- Improved
- Enhanced behavior:
-
P0608R3 Improving
variant
's Converting Constructor/Assignment is now unconditionally active (i.e. in C++17 mode and above), instead of being restricted to C++20 mode and above. #4713- This C++20 behavioral change was originally implemented by #1629 in VS 2019 16.10. While it can have source-breaking impact, it generally has highly desirable effects.
- Changed the machinery for copying
map
/set
nodes to use scope guards instead ofthrow;
, making debugging easier when exceptions are thrown. #4749 - Added debug checks to
gcd()
andlcm()
for precondition violations. #4776 - Added "lifetimebound" attributes to
min
,max
,clamp
,ranges::min
,ranges::max
, andranges::clamp
, allowing MSVC code analysis and Clang-Wdangling
to detect dangling references in improper usage. #4838 - Updated the precondition check in
vector::pop_back()
to be guarded by_CONTAINER_DEBUG_LEVEL
. #4849 - Renamed the parameters of
views::iota
andviews::repeat
to provide better IDE guidance. #4908 - Simplified internal locale facet machinery to use class-specific
operator new
andoperator delete
overloads in both release and debug mode. #4916
-
P0608R3 Improving
- Improved debugger visualization:
- Improved test coverage:
- Updated LLVM-derived test coverage for
<any>
,<optional>
, and<variant>
. #4713 - Properly tested the resolution of LWG-4053 "Unary call to
std::views::repeat
does not decay the argument". #4748 - Improved the benchmarks for
bitset::to_string()
. #4817 - Updated our LLVM submodule, including new tests. #4862 #4910
- Re-enabled tests that were previously skipped in the
libcxx
test suite. #4721 #4732 #4911 - Skipped tests that were sporadically failing due to incorrect timing assumptions. #4885
- Added compiler bug workarounds. #4895
- Tested the resolution of LWG-4105 "
ranges::ends_with
's Returns misses difference casting". #4897 - Updated tests to work with Clang 19. #4912
- Avoided unnecessary usage of
rand()
, which is considered harmful. #4921
- Updated LLVM-derived test coverage for
- Code cleanups:
- Removed compiler bug workarounds. #4725 #4782 #4889
- Various cleanups (described in detail in the PRs, not repeated here). #4724 #4900 #4920
- Replaced SFINAE with concepts in C++20-and-later code. #4718 #4819
- Removed a significant amount of unused code calling
GetCurrentPackageId
. #4742 - Simplified how
ranges::equal
compares sizes. #4864
- Reverted change:
- Infrastructure improvements:
- Build system improvements:
- Added
/Zc:preprocessor
to build the STL with the conformant preprocessor. #4886 - Improved how CMake searches for the clang-format executable. #4888
- Added
- Updated
_MSVC_STL_UPDATE
. #4706 #4708 #4754 #4872