Skip to content

VS 2022 17.7

Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 09 Mar 05:29
· 499 commits to main since this release
a621095
  • Merged C++23 features:
    • P1467R9 #3583 Extended Floating-Point Types
      • Note: This means that we provide the <stdfloat> header containing an empty namespace std {}, as we don't support any optional extended floating-point types.
    • P2093R14 #3337 <print>: Formatted Output
      • P2539R4 Synchronizing print() With The Underlying Stream
    • P2164R9 #3472 views::enumerate
    • P2165R4 #3372 Compatibility Between tuple, pair, And tuple-like Objects
    • P2321R2 zip, completed by implementing:
      • views::adjacent and views::pairwise. #3508
      • views::adjacent_transform and views::pairwise_transform. #3546
    • P2374R4 #3561 views::cartesian_product
      • P2540R1 Empty Product For Certain Views
    • P2572R1 #3629 std::format Fill Character Allowances
    • P2609R3 #3486 Relaxing Ranges Just A Smidge
    • P2614R2 #3482 Deprecating float_denorm_style, numeric_limits::has_denorm, numeric_limits::has_denorm_loss
    • P2652R2 #3542 Disallowing User Specialization Of allocator_traits
    • P2655R3 #3513 common_reference_t Of reference_wrapper Should Be A Reference Type
    • P2736R2 #3556 Referencing The Unicode Standard
      • <format> now understands Unicode 15.
    • P2770R0 #3466 Stashing Stashing Iterators For Proper Flattening
  • Merged partial C++23 features:
    • P2286R8 Formatting Ranges:
      • Implemented the ? format specifier for strings and characters. #3656
  • Merged LWG issue resolutions:
    • LWG-2195 #3506 Missing constructors for match_results
    • LWG-2309 #3469 mutex::lock() should not throw device_or_resource_busy
    • LWG-2381 #3364 Inconsistency in parsing floating point numbers
    • LWG-3204 #3494 sub_match::swap only swaps the base class
    • LWG-3655 #3495 The INVOKE operation and union types
    • LWG-3677 #3396 Is a cv-qualified pair specially handled in uses-allocator construction?
    • LWG-3720 #3511 Restrict the valid types of arg-id for width and precision in std-format-spec
    • LWG-3733 #3496 ranges::to misuses cpp17-input-iterator
    • LWG-3734 #3503 Inconsistency in inout_ptr and out_ptr for empty case
    • LWG-3821 #3509 uses_allocator_construction_args should have overload for pair-like
    • LWG-3833 #3477 Remove specialization template<size_t N> struct formatter<const charT[N], charT>
    • LWG-3836 #3587 std::expected<bool, E1> conversion constructor expected(const expected<U, G>&) should take precedence over expected(U&&) with operator bool
    • LWG-3847 #3479 ranges::to can still return views
    • LWG-3851 #3517 chunk_view::inner-iterator missing custom iter_move and iter_swap
    • LWG-3860 #3480 range_common_reference_t is missing
    • LWG-3862 #3471 basic_const_iterator's common_type specialization is underconstrained
    • LWG-3865 #3476 Sorting a range of pairs
      • This can be a source-breaking change in unusual scenarios.
    • LWG-3869 #3487 Deprecate std::errc constants related to UNIX STREAMS
    • LWG-3870 #3475 Remove voidify
    • LWG-3872 #3470 basic_const_iterator should have custom iter_move
    • LWG-3875 #3485 std::ranges::repeat_view<T, IntegerClass>::iterator may be ill-formed
    • LWG-3877 #3504 Incorrect constraints on const-qualified monadic overloads for std::expected
    • LWG-3887 #3589 Version macro for allocate_at_least
  • Fixed bugs:
    • Fixed the ios_base constants (e.g. ios_base::binary, ios_base::failbit, ios_base::hex) to have the correct bitmask types. #3405
    • Fixed compiler errors found with Clang 16. #3483
    • Fixed <ranges> to avoid using list-initialization when the difference between braces and parentheses is observable. #3493
    • Fixed pmr::unsynchronized_pool_resource to respect pmr::pool_options::max_blocks_per_chunk when it's smaller than the default initial number of blocks per chunk. #3510
    • Fixed technically undefined behavior in <regex> and <sstream> found by Clang/LLVM's Undefined Behavior Sanitizer (UBSan). #3452
    • Fixed compiler errors when calling ranges::equal with ranges involving views::iota. #3551
    • Fixed the STL's iterator unwrapping machinery to avoid requiring a _Prevent_inheriting_unwrap typedef. #3566
    • Fixed spurious warnings from Clang's -Wzero-as-null-pointer-constant when comparing the spaceship operator's return types (partial_ordering, weak_ordering, strong_ordering) with literal 0. #3581
    • Fixed bind() function objects to have constrained function call operators, so they interact properly with is_invocable and related scenarios. #3577
    • Reverted #2654 (which affected <future>'s use of <ppltasks.h> in Desktop XAML apps) because it introduced an ole32.dll dependency that broke multiple scenarios. #3607
      • We backported this revert to VS 2022 17.6.
    • Fixed views::cartesian_product to avoid compiler errors in pathological scenarios. #3609
    • Fixed incorrect results for ranges larger than 4 GB passed to the vectorized implementations of min_element(), max_element(), and minmax_element(). #3619
      • This also affected ranges::min_element, ranges::max_element, ranges::minmax_element, ranges::min, ranges::max, ranges::minmax, and the min(), max(), and minmax() overloads for initializer_list.
      • This fixed a regression that was introduced by #2447 #2821 #2825 in VS 2022 17.4.
    • Added a compiler bug workaround for MSVC in shared_ptr's operator<=>. #3647
      • This avoids compiler errors when comparing shared_ptr<const int> to shared_ptr<void>.
    • Added a space to chrono::ambiguous_local_time's message to exactly match the Standard. #3650
    • Fixed compiler errors when formatting unusual chrono::duration types. #3649
    • Fixed optional::transform() to avoid terminating when the callable object throws an exception. #3668
    • Fixed <charconv> floating-point from_chars() to correctly handle two scenarios involving exponents with large absolute values. #3670
    • Fixed iostreams floating-point parsing to produce correct results for many different scenarios. #3364
    • Fixed compiler errors when importing the Standard Library Modules and calling typeid(T).name(). #3677
    • Fixed some nasty corner cases in cartesian_product_view. #3678
    • Fixed some issues with parsing numbers with grouping separators. #3684
    • Fixed a bug that could result in unordered_meow containers allocating too few buckets. #3687
  • Improved performance:
    • Slightly optimized mutex and recursive_mutex construction by avoiding a Windows API call. #3522
    • Slightly optimized unique_ptr move assignment by avoiding an unnecessary branch. #3540
    • Optimized chrono::time_zone::to_sys and chrono::time_zone::to_local, with a speedup of approximately 3x (times, not percent). #3579
    • Optimized type_index::operator<=> to avoid calling the comparison function twice. #3600
    • Inserted the VZEROUPPER instruction at the end of every AVX2 codepath in the STL's vectorized algorithms, improving performance in non-optimized debug mode when the compiler doesn't automatically insert this instruction. #3630
    • Optimized the constructors system_error(error_code) and system_error(int, const error_category&). #3635
  • Improved throughput:
    • <optional> and <variant> now include fewer headers. #3624
    • Moved internal machinery into <regex> where it's needed. #3625
    • C++20 <chrono> now avoids including <algorithm>. #3626
    • <compare> now avoids including <bit>. #3627
    • Refactored a central internal header so that the rest of the STL includes fewer headers and provides less machinery beyond what's required. #3623 #3654
      • Common source-breaking impact:
        • Need to include <cstdlib> for exit, quick_exit, etc.
        • Need to include <initializer_list> for initializer_list.
          • Sometimes initializer_list is used implicitly when only braces appear in the source code.
        • Need to include <functional> for unary_function and binary_function.
          • Note that unary_function and binary_function were deprecated in C++11 and removed in C++17, so it's best to stop using them completely.
      • Uncommon source-breaking impact:
        • Need to include <memory> for addressof.
        • Need to include <functional> for less, less_equal, greater, greater_equal, equal_to, not_equal_to, plus, minus, and multiplies.
    • When the STL needs to call swap via Argument-Dependent Lookup, it now does so directly; the internal helper function _Swap_adl has been removed. #3700
  • Enhanced behavior:
    • Silenced CodeQL warnings. #3489 #3585
    • Silenced occurrences (in bitset::reference and test code) of MSVC's new off-by-default warning C5267 for deprecated implicit copy constructors/assignment operators. #3497
    • Enabled <source_location> for Clang. #3584
    • Removed the non-Standard xtime type from <chrono>. #3594
    • Added static_asserts to containers, container adaptors, and allocator to improve the error messages when they're given non-object types. #2436 #3660
      • allocator<void> is still permitted as a special case.
  • Improved test coverage:
    • Added test coverage with Clang/LLVM's Undefined Behavior Sanitizer (UBSan). #3452
    • Added more tests for views::empty, views::iota, views::istream, views::repeat, and views::single. #3553
    • Fixed nonconformant code in the test for Standard Library Header Units and Modules. #3588
    • Added test coverage for C++23's customization point objects. #3610
    • Added more tests for ranges::ref_view, ranges::subrange, views::common, views::filter, views::join, views::reverse, and views::transform. #3612
  • Code cleanups:
  • Improved documentation:
    • Added documentation about the STL's import library. #2141
  • Infrastructure improvements:
    • The internal test runner now understands compile-only tests and libcxx/expected_results.txt. Consequently, (1) compile-only tests (test.compile.pass.cpp) no longer need a redundant int main() {} // COMPILE-ONLY, and (2) we no longer need to redundantly update libcxx/skipped_tests.txt (which has been removed) identically to libcxx/expected_results.txt. #3484
    • Enforced the usage of only core headers when building the STL's import library. #3621
    • Updated dependencies. #3490 #3651 #3711
      • Updated build compiler to VS 2022 17.7 Preview 1 (17.6 now required).
      • Updated Clang to 16.0.1 (now required).
      • Updated CMake to 3.26.0 (now required).
      • Updated Python to 3.11.3.
      • Updated Boost.Math to 1.82.0. #3657
  • Updated _MSVC_STL_UPDATE. #3518 #3643 #3680