Skip to content

VS 2022 17.14

Latest
Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 14 May 23:36
· 135 commits to main since this release
1f6e5b1
  • Merged C++26 features:
    • P3323R1 #5213 Forbid atomic<cv T>, Specify atomic_ref<cv T>
  • Merged partial C++26 features:
    • P3471R4 #5274 Standard Library Hardening
      • Currently disabled by default.
      • This can be enabled (for any Standard mode) by defining _MSVC_STL_HARDENING to 1 project-wide.
      • As C++26 Contracts are not yet implemented, this defaults to calling __fastfail() for hardened precondition violations.
  • Related behavior enhancement:
    • Implemented "destructor tombstones" to mitigate use-after-free mistakes. #5318
      • Currently disabled by default.
      • This can be enabled by defining _MSVC_STL_DESTRUCTOR_TOMBSTONES to 1 project-wide.
  • Merged LWG issue resolutions:
    • LWG-3133 #5157 Modernizing numeric type requirements
    • LWG-3886 #5232 Monad mo' problems (in optional and expected)
    • LWG-3899 #5303 co_yielding elements of an lvalue generator is unnecessarily inefficient
    • LWG-3900 #5150 The allocator_arg_t overloads of generator::promise_type::operator new should not be constrained
    • LWG-3918 #5135 #5170 std::uninitialized_move/_n and guaranteed copy elision
    • LWG-3956 #5334 chrono::parse uses from_stream as a customization point
    • LWG-4014 #5132 LWG-3809 changes behavior of some existing std::subtract_with_carry_engine code
    • LWG-4027 #5221 possibly-const-range should prefer returning const R&
    • LWG-4084 #5151 std::fixed ignores std::uppercase
    • LWG-4112 #5152 has-arrow should require operator->() to be const-qualified
    • LWG-4119 #5220 generator::promise_type::yield_value(ranges::elements_of<R, Alloc>)'s nested generator may be ill-formed
    • LWG-4124 #5155 Cannot format zoned_time with resolution coarser than seconds
    • LWG-4135 #5131 The helper lambda of std::erase for list should specify return type as bool
    • LWG-4140 #5129 Useless default constructors for bit reference types
    • LWG-4144 #5201 Disallow unique_ptr<T&, D>
    • LWG-4169 #5128 std::atomic<T>'s default constructor should be constrained
    • LWG-4172 #5337 unique_lock self-move-assignment is broken
  • Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
    • LWG-3424 #5232 optional::value_or should never return a cv-qualified type
  • Fixed bugs:
    • Fixed system_category().message() to prefer US English, followed by the system locale, with an ultimate fallback of FormatMessageA's behavior for dwLanguageId == 0. #5104
      • This is consistent with generic_category().message() (which always returns US English in our implementation) and has the best chance of returning something intelligible instead of "unknown error" or "???".
      • This fixed a regression that was introduced by #2669 in VS 2022 17.3.
    • Fixed regex's behavior:
      • To reject bogus character class ranges like R"([\d-e])". #5158
      • For negated character class escapes (\D for non-digits, \S for non-whitespace, \W for non-words) when matching against Unicode characters:
        • Outside square-bracket character classes. #5160
        • Inside square-bracket character classes (partially fixed). #5214
      • For character ranges in case-insensitive mode. #5164
      • For the basic grammar to parse a single digit for backreferences. #5167
      • For its internal buffers to grow geometrically. #5175
      • For the special character . (dot). #5192
      • For its constructor to accept (null, zero) arguments. #5211
    • Fixed filesystem::equivalent() to return correct results when shared folders are involved. #5130
    • Fixed chrono::weekday's constructor to avoid integer overflow for extreme inputs. #5156
    • Fixed push_range() for stack, queue, and priority_queue to forward the range to c.append_range() when possible, exactly as depicted in the Standard. #5168
    • Fixed code to call ranges::begin and ranges::end exactly as depicted in the Standard:
    • Fixed compiler errors in range_formatter involving highly unusual contiguous ranges. #5187
    • Fixed heterogeneous lookup for unordered containers to follow the Standard, allowing braced initializer lists to be used as arguments. #5208
    • Fixed compiler errors in views::counted involving highly unusual types. #5223
    • Fixed integer overflow in this_thread::sleep_for() with extremely small units (e.g. picoseconds). #5237
    • Fixed basic_string::reserve()'s ASan annotations to detect writes to its unused capacity. #5252
    • Fixed how <format> handles field width for alternate form general floating-point. #5261
    • Fixed compiler errors when constructing a basic_ispanstream from a modifiable basic_string. #5309
      • This fixed a regression that was introduced by #4938 in VS 2022 17.13.
    • Fixed compiler errors when using <format> in a CUDA project, by adding a compiler bug workaround. #5335
    • Fixed compiler errors when converting between different specializations of basic_const_iterator. #5325
  • Improved performance:
    • Added vectorized implementations of:
      • basic_string::find() for a character. #5101
    • Improved the vectorized implementations of:
      • basic_string::find_first_of() and basic_string::find_last_of(). #5029
    • regex_traits::translate() is now an identity function, as required by the Standard, instead of an expensive locale operation. #5209
    • The STL now takes advantage of compiler support for C++23 P1169R4 static operator() in earlier Standard modes, slightly improving codegen. #5284 #5312
    • Optimized the minstd_rand and minstd_rand0 random number engines by avoiding constant divisions. #5256
    • Slightly improved move_only_function's constructors to do less work when setting the object to be empty. #5328
  • Enhanced behavior:
    • std::expected, std::unexpected, and all STL exception types are now marked [[nodiscard]]. #5174
      • This affects all user-defined functions returning these types by value. It also affects any directly constructed temporaries that are immediately discarded.
    • Deprecated the non-Standard locale::empty() static member function. #5197
    • Changed the STL to avoid using is_trivial, which is being deprecated in C++26. #5202
    • Improved the STL's debug checks with better messages and fewer branches. #5270
  • Improved debugger visualization:
    • Improved the visualizers for basic_string_view and its iterators by suppressing irrelevant pointer values. #5176
    • Dramatically simplified how the visualizers for basic_string and its iterators are implemented. #5177
  • Improved test coverage:
    • Simplified the test harness by dropping ctest. Now we always directly invoke stl-lit.py. #5169
    • Improved the test harness to warn only once when a compiler is missing. #5199
    • Categorized libcxx test failures. #5231
    • Updated our LLVM submodule, including new tests. #5235
    • Added test coverage for the ASan annotations in basic_string::reserve() and vector::reserve(). #5241
    • Skipped libcxx tests in response to a new compiler warning C5321, which warns when the resolution to CWG-1656 affects a u8 string literal. #5283
  • Code cleanups:
    • Removed compiler bug workarounds. #5186 #5247 #5257 #5284 #5335
    • Removed usage of [[likely]] and [[unlikely]], which are discouraged by the compiler team. #5255
    • Various cleanups (described in detail in the PRs, not repeated here). #5336
  • Infrastructure improvements:
    • Updated dependencies. #5186 #5247 #5257 #5284 #5335
      • Updated build compiler to VS 2022 17.14 Preview 2 (now required).
      • Updated Clang to 19.1.5 (now required).
      • Updated Google Benchmark to 1.9.1.
      • Updated Python to 3.13.2.
      • Updated VMs to compute-optimized F32as_v6.
  • Updated _MSVC_STL_UPDATE. #5162 #5217 #5264 #5323