·
135 commits
to main
since this release
- 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