Skip to content

VS 2022 17.11

Latest
Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 15 Aug 11:47
· 121 commits to main since this release
e36ee6c
  • Merged C++26 features:
  • Merged partial C++23 features:
  • Merged LWG issue resolutions:
    • LWG-3767 #4542 codecvt<charN_t, char8_t, mbstate_t> incorrectly added to locale
    • LWG-3919 #4526 enumerate_view may invoke UB for sized common non-forward underlying ranges
    • LWG-3950 #4510 std::basic_string_view comparison operators are overspecified
    • LWG-3984 #4543 ranges::to's recursion branch may be ill-formed
    • LWG-4012 #4529 common_view::begin/end are missing the simple-view check
    • LWG-4013 #4530 lazy_split_view::outer-iterator::value_type should not provide default constructor
    • LWG-4016 #4539 container-insertable checks do not match what container-inserter does
    • LWG-4035 #4525 single_view should provide empty
    • LWG-4053 #4685 Unary call to std::views::repeat does not decay the argument
    • LWG-4054 #4540 Repeating a repeat_view should repeat the view
  • Fixed bugs:
    • Fixed condition_variable::wait_until() and condition_variable_any::wait_until() to consistently use the given time_point's clock type, instead of also depending on the system clock. This also fixed condition_variable::wait_for() to consistently use steady_clock. #4457
    • Fixed <format> to always perform compile-time format string checking for wchar_t, even when the narrow execution character set doesn't support it. #4459
    • Fixed compiler errors when constexpr basic_string interacted with the undocumented compiler option /d1initall. #4474
    • Fixed atomic_ref for 16-byte objects to correctly report is_lock_free() and is_always_lock_free on x64 (when the optional mode _STD_ATOMIC_ALWAYS_USE_CMPXCHG16B is defined to be 1) and ARM64 (always). #4478
    • Removed the vectorized implementation of ranges::find with unreachable_sentinel as it was fundamentally incompatible with ASan (Address Sanitizer). #4486
      • This was introduced by #2434 in VS 2022 17.3.
    • Fixed incorrect results from the vectorized implementation of ranges::find_last for certain combinations of value and element types. #4561
      • This fixed a regression that was introduced by #3925 in VS 2022 17.9.
    • Fixed the STL to avoid emitting the off-by-default warning C4365 (signed/unsigned mismatch) when the /ZI compiler option (debug info for Edit and Continue) is used. #4487
      • These warnings were most noticeable when building the Standard Library Modules, but they were also emitted by classic includes.
    • Fixed the STL to avoid emitting the off-by-default warning C5246 (brace elision). #4527
    • Fixed compiler errors involving incomplete types in:
      • pair and tuple machinery. #4488
    • Fixed make_from_tuple() to properly implement LWG-3528 with a constraint instead of a static_assert. #4528
    • Added integral overloads for <cmath>'s classification functions fpclassify(), isfinite(), isinf(), isnan(), isnormal(), and signbit(). #4537
    • Fixed is_trivial to correctly handle unusual types. #4576
    • Avoided mentioning __vectorcall for ARM64EC, where it is not yet supported. #4600
    • Fixed std.ixx to include <intrin.h> in the Global Module Fragment, fixing compiler errors with import std; in certain scenarios. #4626
    • Fixed compiler errors when a user-defined formatter calls basic_format_parse_context::next_arg_id() with an empty format-spec. #4640
    • Fixed compiler errors when using <expected> in /permissive mode. #4658
      • Note: While /permissive mode is discouraged, it's currently supported for most STL components.
    • Fixed compiler errors when inheriting expected's constructors in certain scenarios. #4664
    • Fixed pair's self-swap() behavior to follow the Standard by self-swapping its elements. #4674
    • Fixed atomic<void*> and atomic_ref<void*> to provide difference_type. #4689
  • Improved performance:
    • Helped the compiler auto-vectorize:
      • replace_copy(), replace_copy_if(), ranges::replace_copy, and ranges::replace_copy_if. #4431
      • iota(). #4627
      • ranges::iota. #4647
    • Added vectorized implementations of:
      • find_first_of() and ranges::find_first_of. #4466 #4557 #4563 #4587 #4623
      • mismatch() and ranges::mismatch. #4495 #4538 #4584
      • replace() and ranges::replace for 32-bit and 64-bit elements. #4554 #4584
      • lexicographical_compare(), ranges::lexicographical_compare, and lexicographical_compare_three_way(). #4552
    • Further improved the vectorized implementations of:
      • count(), find(), ranges::count, ranges::find, and ranges::find_last. #4570 #4614
    • Used Clang builtins to improve the performance of <cmath>'s floating-point classification and comparison
      functions: #4612
      • Classification: isfinite(), isinf(), isnan(), isnormal()
      • Comparison: isgreater(), isgreaterequal(), isless(), islessequal(), islessgreater(), isunordered()
    • Improved normal_distribution::operator()(engine, param) by avoiding unnecessarily recomputing coefficients. #4618
  • Improved throughput:
    • Slightly improved <mdspan> throughput by using short-circuiting conjunction_v instead of fold expressions. #4559
    • Refactored floating-point machinery, improving throughput by reducing inclusion of various headers. #4615
    • Improved <string_view> throughput by no longer dragging in most of <string>'s contents. #4633
  • Improved diagnostics:
    • Improved compiler error messages when formatter<UDT>::format() isn't const. #4461
    • Massively improved the compiler error messages for get<T>(tuple<Types...>) when T doesn't occur exactly once in Types. #4578
    • Significantly improved compiler error messages when ranges::to is unable to construct the requested result. #4608
  • Enhanced behavior:
    • To reduce risk, the STL no longer attempts to activate vectorized implementations of algorithms for ancient processors that support SSE2 but not SSE4.2. #4550
      • This consolidated the STL's levels of vectorization to none, SSE4.2, and AVX2.
      • This also slightly improved performance (for non-ancient processors) by taking advantage of newer instructions in codepaths that previously restricted themselves to SSE2.
    • Added precondition checking in debug mode to:
      • views::take. #4551
      • The iota_view(first, last) constructor. #4616
    • Improved the wording of [[nodiscard("reason")]] messages for empty(). #4572
    • Extended C++20's static_assert(is_clock_v<Clock>) enforcement for various codepaths to C++14/17 (with internal machinery; is_clock_v itself remains guarded by C++20 mode). #4585
    • Changed the internal constructors of basic_format_arg::handle and basic_format_context to be private. #4489
    • Deprecation warnings for several non-Standard extensions are now emitted in all Standard modes, not just C++17 and later. These extensions will be removed in the future; you have been warned: #4605
      • stdext::checked_array_iterator, stdext::make_checked_array_iterator(), stdext::unchecked_array_iterator, and stdext::make_unchecked_array_iterator().
      • basic_istream's ipfx()/isfx() and basic_ostream's opfx()/osfx() member functions.
      • discard_block, linear_congruential, mersenne_twister, subtract_with_carry, uniform_int, and uniform_real.
  • Removed non-Standard code:
    • Deleted the <cvt/meow> subdirectory of headers, shrinking VS installations by 4.8 MB across 78 files. #4458
    • Deleted the <experimental/meow> headers that provided std::experimental::erase()/erase_if(). #4470
    • Removed the non-Standard _FPOSOFF macro and the non-Standard std::fpos::seekpos() member function. #4606
    • Removed the non-Standard lower_bound()/upper_bound() member functions from the unordered associative containers. #4607
  • Improved test coverage:
    • Added benchmarks for vectorized swap_ranges(). #4589
    • Added a workaround for an ASan failure in an ancient STL test. #4652
    • Reduced the execution time of the vectorized algorithms test by using the result of mismatch() when testing lexicographical_compare() and lexicographical_compare_three_way(). #4656
    • Improved the <filesystem> test, including its coverage of rename() and how it generates names for temporary files and directories. #4665
    • Re-enabled tests that were previously skipped in the libcxx test suite. #4698
    • Updated our LLVM submodule, including new tests. #4702
  • Code cleanups:
    • Removed compiler bug workarounds. #4475 #4576
    • Various cleanups (described in detail in the PRs, not repeated here). #4465 #4490 #4493
    • Improved the script for downloading Unicode data files when updating <format>. #4469
    • Consistently centralized how algorithms invoke their vectorized implementations. #4544
    • Simplified how condition_variable is implemented as a wrapper around the Windows API CONDITION_VARIABLE. #4545
    • Removed inline from constexpr variable templates. #4546
      • This became possible after all of our supported compilers implemented CWG-2387. Note that for constexpr variables, only primary templates and partial specializations no longer need to be marked as inline; explicit specializations and ordinary non-templates still need to be marked as inline.
    • Changed machinery for updating chrono::tzdb::version to activate the Named Return Value Optimization. #4577
    • Updated tests to use C++17 terse static_assert. #4588
    • Simplified function templates to use static_assert(false) as permitted by CWG-2518. #4591
    • Simplified debug checks for comparison function objects by using if constexpr. #4610
    • Simplified char_traits::assign() by removing unnecessary codepaths for constant evaluation. #4613
    • Changed checks for damaged logic in the STL itself to use internal static_assert macros, which expand to nothing outside of the STL's test suites. #4624
    • Simplified ranges::stable_sort to use iter_value_t instead of an internal helper. #4628
    • Changed the STL to use in_range<T>() more and numeric_limits<T>::min()/max() less. #4634
    • Replaced SFINAE with concepts in C++20-and-later code. #4637
    • Simplified the vectorized implementation of the minmax() family for 64-bit elements. #4661
    • Modernized our usage of Google Benchmark. #4662
  • Infrastructure improvements:
    • Overhauled our Azure Pipelines machinery: #4594 #4687
      • Introduced "Early Build" stages to quickly find compiler errors when building the STL.
      • Improved the reliability of the submodule checkout task.
      • Improved how clang-format diffs are uploaded and logged.
    • Updated dependencies. #4475 #4492 #4576 #4568 #4594 #4687
      • Updated build compiler to VS 2022 17.11 Preview 1.
      • Updated to Windows 11 SDK 22621. This is now required for building and testing the STL, but not for using it.
      • Updated CUDA to 12.4.0 (now required).
      • Updated Python to 3.12.3.
      • Updated Boost.Math to 1.85.0. #4599
      • Updated Google Benchmark to 1.8.4. #4694
  • Updated _MSVC_STL_UPDATE. #4467 #4556 #4655