Skip to content

VS 2022 17.12

Latest
Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 14 Nov 22:58
· 125 commits to main since this release
91e4255
  • Merged C++26 features:
  • Merged C++23 features:
    • P2286R8 Formatting Ranges, completed by:
      • Implemented range-default-formatter. #4716
      • Implemented formatter for the container adaptors stack, queue, and priority_queue. #4825
  • Merged LWG issue resolutions:
    • LWG-3944 #4784 Formatters converting sequences of char to sequences of wchar_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
  • 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.
    • Fixed atomic_ref::is_lock_free() on x64 to return true 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 the max 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 use steady_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:
      • Unknown conversion specifiers. (Now they're copied unchanged.) #4840
      • Out-of-range tm fields. (Now they're replaced with a ? character.) #4883
    • Fixed compiler errors in ranges::inplace_merge and ranges::minmax in unusual scenarios. #4841
    • Fixed truncation warnings when:
      • Using conjunction and disjunction with non-bool_constant arguments. #4846
      • Calling algorithms with contiguous iterators whose difference types are narrower than ptrdiff_t. #4898
    • 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(), and transform_exclusive_scan() when the intermediate and output types are different. #4701
    • Fixed the vectorized implementation of floating-point ranges::min, ranges::max, and ranges::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) or L (locale-specific form) options. #4907
  • Improved performance:
    • Overhauled condition_variable and condition_variable_any, improving their performance and simplifying their implementation. #4720
      • As a result, condition_variable, timed_mutex, and recursive_timed_mutex are now trivially destructible.
    • Improved the performance of search(), find_end(), and their ranges forms by removing calls to memcmp() 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:
      • The minmax_element() and minmax() algorithm families. #4659 #4739
    • Slightly improved the performance of ranges::min, ranges::max, and ranges::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
    • 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 a basic_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, and ranges::find to call wmemcmp/wmemchr/wcslen when possible, which will improve performance after a future UCRT header update. #4873 #4894
    • Optimized equality comparisons for empty strings and string_views. #4904
  • Improved throughput:
    • Improved <queue> and <stack> throughput by dragging in fewer headers. #4707
  • 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 of throw;, making debugging easier when exceptions are thrown. #4749
    • Added debug checks to gcd() and lcm() for precondition violations. #4776
    • Added "lifetimebound" attributes to min, max, clamp, ranges::min, ranges::max, and ranges::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 and views::repeat to provide better IDE guidance. #4908
    • Simplified internal locale facet machinery to use class-specific operator new and operator delete overloads in both release and debug mode. #4916
  • Improved debugger visualization:
    • Inserted the debug visualizer changes from #3848, #4274, #4835, and #4836 in the VS repo so they'll finally ship.
  • 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
  • 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:
    • Removed then temporarily restored support for targeting Windows 7 and Server 2008 R2. This will be permanently removed in 18.0 Preview 1. #4742 #4857
  • Infrastructure improvements:
    • The STL now clearly rejects attempts to:
      • Build a preset whose architecture doesn't match the compiler command prompt. #4709
      • Test a build whose architecture doesn't match the compiler command prompt. #4717
    • Updated dependencies. #4725 #4824 #4889
      • Updated build compiler to VS 2022 17.12 Preview 1 (and 17.11 is now required).
      • Updated CMake to 3.29 (now required).
      • Updated Ninja to 1.12.1.
      • Updated Python to 3.12.5.
      • Updated Google Benchmark to 1.8.5. #4851
  • 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
  • Updated _MSVC_STL_UPDATE. #4706 #4708 #4754 #4872