StephanTLavavej
released this
14 Nov 22:58
·
95 commits
to main
since this release
- 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