Skip to content

VS 2022 17.13

Latest
Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 16 Feb 07:39
· 68 commits to main since this release
5e0ddad
  • Merged C++23 features:
  • Merged C++23 Defect Reports:
    • P3107R5 #4821 Permit An Efficient Implementation Of <print>
      • P3235R3 std::print More Types Faster With Less Memory
  • 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_ptrs (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 and basic_ispanstream::span() taking ReadOnlyRange&& with highly unusual types. #4938
    • Fixed compiler errors in the highly unusual scenario of calling basic_string and basic_string_view's find_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 operator operator>>(basic_istream<CharT, Traits>&, bitset<N>&) to use the stream's Traits to compare characters. #4970
    • Fixed basic_string and list'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 when numeric_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 our memmove() optimization. #5046
      • Also fixed our memmove() optimization (used by copy_n(), ranges::copy_n, and more) to avoid emitting compiler warnings with certain iterators.
    • Fixed filesystem::directory_entry::refresh() to avoid sporadically failing for nonexistent network paths on Windows 11 24H2. #5077
    • Fixed basic_istream::get() and basic_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 to static_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
  • Improved performance:
    • Added vectorized implementations of:
      • basic_string::find_first_of(). #4744
      • basic_string::find_last_of(). #4934
      • basic_string::find() for a substring. #5048
      • basic_string::rfind() for a substring. #5057
      • basic_string::rfind() for a single character. #5087
      • search(), ranges::search, and default_searcher, for 1-byte and 2-byte elements. #4745
      • find_end() and ranges::find_end, for 1-byte and 2-byte elements. #4943 #5041 #5042
      • bitset's constructors from strings. #4839
      • remove() and ranges::remove. #4987
    • Improved the vectorized implementations of:
      • ranges::minmax, now activated for 1-byte and 2-byte elements. #4913
      • The minmax_element() and minmax() algorithm families. #4917 #5016
    • 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 nullary println(). #4672
    • Updated array and vector's spaceship comparison operators to take advantage of the vectorized implementation of lexicographical_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
  • 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, and chrono_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 like system_clock or UDLs like 1729ms, you need to include <chrono> specifically, instead of assuming that headers like <thread> will drag it in.
  • Enhanced behavior:
    • Changed an internal pair constructor to be private. #4979
    • Fixed a CodeQL warning by replacing a squirrelly memcpy() call in the filesystem implementation (that was intentionally performing a read overrun) with two cromulent memcpy() 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 of throw;, making debugging easier when exceptions are thrown. #4977
    • Improved regex_error::what()'s message for regex_constants::error_badbrace. #5025
    • Improved optional<T>::swap()'s static_assert messages when T isn't both move constructible and swappable. #5065
    • Removed locale::id's non-Standard constructor from size_t and implicit conversion operator to size_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
  • 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 a priority parameter, defaulting to idle. #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(), and lexicographical_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 as noexcept. #4940
    • Various cleanups (described in detail in the PRs, not repeated here). #4945 #5014 #5058
    • Refactored internal usage of the tuple-like and pair-like concepts. #4983
    • Used if constexpr to simplify eldritch horrors from beyond spacetime locale 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
  • Infrastructure improvements:
    • Updated dependencies. #4947 #5017 #5082
      • Updated build compiler to VS 2022 17.13 Preview 1 (and 17.12 is now required).
      • Updated Clang to 18.1.8 (now required).
      • Updated CMake to 3.30 (now required).
      • Updated Python to 3.13.0 (now required).
      • Updated the PR/CI system to Windows Server 2025.
  • Build system improvements:
    • Removed a workaround in the benchmark build. #4928
  • Updated _MSVC_STL_UPDATE. #4926 #4994 #5064