·
68 commits
to main
since this release
- 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()
. #4744basic_string::find_last_of()
. #4934basic_string::find()
for a substring. #5048basic_string::rfind()
for a substring. #5057basic_string::rfind()
for a single character. #5087search()
,ranges::search
, anddefault_searcher
, for 1-byte and 2-byte elements. #4745find_end()
andranges::find_end
, for 1-byte and 2-byte elements. #4943 #5041 #5042bitset
's constructors from strings. #4839remove()
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