Skip to content

MSVC Build Tools 14.51

Latest

Choose a tag to compare

@StephanTLavavej StephanTLavavej released this 23 Jun 16:43
· 38 commits to main since this release
edd1486

This shipped in VS 2026 18.6.

  • Removed non-Standard features:
    • TR1, including the std::tr1 namespace, the old array::assign() member function, the old <random> engines, and the old <random> distributions uniform_int and uniform_real.
      #5763
      • Deprecated since VS 2017 15.5 in December 2017.
    • <hash_map> and <hash_set>. #5764
      • Deprecated since VS 2015 in July 2015.
    • <experimental/filesystem>. #5765
      • Deprecated since VS 2019 16.3 in September 2019.
    • stdext::checked_array_iterator and stdext::unchecked_array_iterator. #5817
      • Deprecated since VS 2022 17.8 in November 2023 (for C++17 and later) and VS 2022 17.11 in August 2024 (unconditionally).
    • basic_istream::ipfx()/isfx() and basic_ostream::opfx()/osfx(). #5834
      • Deprecated since VS 2022 17.9 in February 2024 (for C++17 and later) and VS 2022 17.11 in August 2024 (unconditionally).
    • locale::empty(). #5834
      • Deprecated since VS 2022 17.14 in May 2025.
  • Merged C++26 features:
    • P3016R6 #5847 Resolve Inconsistencies In begin/end For valarray And Braced Initializer Lists
    • P3349R1 #5683 Converting Contiguous Iterators To Pointers
    • P3503R3 #5630 Make Type-Erased Allocator Use In promise And packaged_task Consistent
    • P3612R1 #5848 Harmonize Proxy-Reference Operations
  • Merged C++23 features:
    • P0429R9 #6071 <flat_map>
    • P2255R2 #5537 #6095 Type Traits To Detect References Binding To Temporaries
    • P2590R2 #6170 Explicit Lifetime Management
      • P2679R2 Fixing start_lifetime_as And start_lifetime_as_array
      • Initially supported for MSVC only. (Clang and EDG support will be enabled when the necessary compiler builtins become available.)
    • P2674R1 #5445 #6095 is_implicit_lifetime
      • Initially supported for MSVC and Clang only. (EDG support will be enabled when the necessary compiler builtins become available.)
  • Merged C++20 Defect Reports:
    • P3860R1 #5846 Make atomic_ref<T> Convertible To atomic_ref<const T>
  • Merged partial C++20 features:
    • P0466R5 Layout-Compatibility And Pointer-Interconvertibility Traits
      • This feature was fully implemented for MSVC by #1575 in VS 2019 16.10.
      • is_layout_compatible and is_pointer_interconvertible_base_of are now implemented for Clang, as the necessary compiler builtins recently became available. #5621
      • is_pointer_interconvertible_with_class() and is_corresponding_member() remain to be implemented for Clang, as the necessary compiler builtins are not yet available.
  • Merged LWG issue resolutions:
    • LWG-3090 #6050 What is [time.duration.cons]/4's "no overflow is induced in the conversion" intended to mean?
    • LWG-3343 #5912 Ordering of calls to unlock() and notify_all() in Effects element of notify_all_at_thread_exit() should be reversed
    • LWG-3436 #5920 std::construct_at should support arrays
    • LWG-3617 #5921 function/packaged_task deduction guides and deducing this
      • This was originally implemented for MSVC by #2966 in VS 2022 17.4. It's now implemented for Clang, after Clang 19 added complete support for P0847R7 "Deducing this".
    • LWG-4015 #6102 LWG-3973 broke const overloads of std::optional monadic operations
    • LWG-4037 #6079 Static data members of ctype_base are not yet required to be usable in constant expressions
    • LWG-4243 #5867 as_bytes/as_writable_bytes is broken with span<volatile T>
    • LWG-4253 #5868 basic_const_iterator should provide iterator_type
    • LWG-4257 #5895 Stream insertion for chrono::local_time should be constrained
    • LWG-4266 #5880 layout_stride::mapping should treat empty mappings as exhaustive
    • LWG-4272 #5900 For rank == 0, layout_stride is atypically convertible
    • LWG-4274 #5893 The chrono::hh_mm_ss constructor is ill-formed for unsigned durations
    • LWG-4294 #5869 bitset(const CharT*) constructor needs to be constrained
    • LWG-4301 #5885 #5940 condition_variable{_any}::wait_{for, until} should take timeout by value
    • LWG-4312 #5904 Const and value category mismatch for allocator_arg_t/allocator_arg in the description of uses-allocator construction
    • LWG-4366 #5896 Heterogeneous comparison of expected may be ill-formed
    • LWG-4398 #5883 enable_nonlocking_formatter_optimization should be disabled for container adaptors
    • LWG-4399 #5897 enable_nonlocking_formatter_optimization for pair and tuple needs remove_cvref_t
  • Fixed bugs:
    • Massively overhauled <regex>:
      • Fixed <regex> to perform matching non-recursively, avoiding stack overflows and improving performance with additional optimizations. #5703 #5714 #5734 #5745 #5762 #5774 #5790 #5798 #5818 #5828 #5835 #5865 #5889 #5918 #5939 #5954 #5961 #6005 #6022 #6026 #6055 #6092 #6127 #6146 #6147 #6162 #6164 #6189 #6191
      • Fixed <regex> bugs when parsing repetitions in extremely unusual cases. #5716
      • Fixed <regex> to avoid throwing a regex_error when a repeated pattern contains a lookahead assertion. #5793
        • This fixed a regression that was introduced by #5456 in the MSVC Build Tools 14.50, and the fix was backported to that release.
      • Fixed <regex> to perform matching correctly when a loop has a bounded number of repetitions and a context-dependent empty alternative. #5820
      • Fixed <regex> to properly update match_results for a default-constructed basic_regex. #6185
    • Fixed basic_string::resize_and_overwrite() to require the given operation to return an integer-like type. #5695
    • Added a compiler bug workaround for Clang x86, fixing 64-bit atomic behavior. #5708
    • Fixed the vector<bool> optimization for copy() to avoid a forbidden negative shift in a specific scenario. #5726
    • Fixed independent_bits_engine to avoid forbidden full shifts in specific scenarios. #5740
    • Fixed compiler errors in vector when programs are taking advantage of our non-Standard legacy support for mismatched allocator types (i.e. vector<T, MyAlloc<U>>, which is forbidden by the Standard). #5729
      • This fixed a regression that was introduced by #4977 in VS 2022 17.13.
    • Fixed compiler warnings and errors in basic_string for allocators with unusual size_types. #5562 #5775
    • Fixed a crash in the x64/x86 vectorized implementations of wstring::find_first_of() and wstring::find_last_of() that was specific to searching for certain combinations of characters inside and outside the [0, 255] range. #5758
      • This fixed a regression that was introduced by #5029 in VS 2022 17.14.
      • This fix was backported to VS 2022 17.14.20 and the MSVC Build Tools 14.50.
    • Fixed std::pow(dbl, 2) to return dbl * dbl as a special case, working around an accuracy issue in UCRT ::pow() that affects ~0.04% of double values. #5771
      • This fixed a regression that was introduced by #903 in VS 2019 16.8.
      • For example, the square of 0.96211481342217475276612503876094706356525421142578125 (hexfloat 0x1.ec9a50154a6f9p-1) is mathematically 0.9256649142063861358000347706773514725967013405547974870554600612150564220570458928705193102359771728515625, which cannot be exactly represented as a 64-bit double. UCRT ::pow(x, 2.0) returns 0.92566491420638608023097049226635135710239410400390625 (hexfloat 0x1.d9f0c06b2463dp-1), but x * x returns 0.9256649142063861912532729547820053994655609130859375 (hexfloat 0x1.d9f0c06b2463ep-1). The double value of x * x is slightly closer to the mathematically exact square, therefore it is correctly rounded and should be returned.
    • Fixed ranges::to, allowing it to create unions. #5794
    • Fixed stable_sort(), stable_partition(), and inplace_merge() to handle over-aligned elements by default. #5807
    • Fixed ranges::partition to meet the Standard's complexity requirements for bidirectional non-common ranges. #5887
    • Fixed the noexcept specification of an internal helper function for debug checks of strict weak orderings, affecting extremely unusual comparison function objects with non-bool return types. #5931
    • Fixed various classes and functions to accept only cv-unqualified types as standard signed and unsigned integer types. #5946
    • Fixed compiler errors in <chrono> formatting for durations with unsigned representation types. #5947
    • Fixed piecewise_constant_distribution, piecewise_linear_distribution, and their param_types to avoid inheriting from discrete_distribution and its param_type. #6032
    • Fixed <format>'s handling of certain characters in non-Unicode code pages. #6059
    • Fixed <locale> to properly reject overlong UTF-8 forms. #6060
    • Fixed filesystem::copy() for junctions on x86. #6064
    • Fixed filesystem::absolute()'s behavior for empty paths to conform to the Standard. #6132
    • Fixed filesystem::equivalent() (and filesystem::copy() with overwrite_existing) to behave correctly on filesystems like FAT32 that don't support 128-bit file IDs. #6187
      • This fixed a regression that was introduced by #5434 in the MSVC Build Tools 14.50.
    • Fixed get_money() and put_money() to enforce the Standard's type requirements for long double or basic_string. #6072
    • Fixed the STL to follow P2615R1 Meaningful Exports, which forbids extern "C++" from being directly applied to an explicit specialization. #6074
    • Fixed compiler errors in variant's copy assignment operator involving unusual types with explicit copy constructors. #6086
    • Fixed iostreams to avoid changing the global locale permanently when the locale name contains non-ASCII characters. #5781 #6179
    • Fixed <chrono> to properly handle daylight saving time for time zones that used it in the past but later abolished it. #6097
    • Fixed compiler errors in any's constructor involving unusual types. #6114
    • Fixed numeric_limits<IntegralType>::traps. #5816
    • Fixed a compiler error in <complex> with Clang 22. #6137
      • This involved the _mm_fmsub_sd() intrinsic.
    • Fixed time_get::do_get() to properly handle the conversion specifications:
    • Fixed num_put::do_put() to avoid relying on frexp()'s unspecified behavior for infinity and NaN. #6168
  • Improved performance:
    • Improved <ranges> performance by adding an optimized implementation of divide-ceiling for 128-bit integers. #5637
    • Updated <complex> to use Fused Multiply-Add (FMA) intrinsics for Clang. #5721
    • Optimized sample(), shuffle(), ranges::sample, and ranges::shuffle by using Daniel Lemire's algorithm Fast Random Integer Generation in an Interval.
      • This was originally implemented for uniform_int_distribution by #3012 in VS 2022 17.5.
    • Added x64/x86 vectorized implementations of:
      • includes() and ranges::includes. #5590
      • replace_copy() and ranges::replace_copy. #5980
    • Added ARM64/ARM64EC vectorized implementations of: #6084
      • swap_ranges() and ranges::swap_ranges. #5819
      • rotate() and ranges::rotate. #5845
      • reverse(), reverse_copy(), ranges::reverse, and ranges::reverse_copy. #5870
      • min_element(), max_element(), minmax_element(), ranges::min_element, ranges::max_element, and ranges::minmax_element. #5949 #6194
      • min(), max(), minmax(), ranges::min, ranges::max, and ranges::minmax. #5963
      • find() and ranges::find. #6003
      • is_sorted_until() and ranges::is_sorted_until. #6018
      • ranges::find_last. #6030
      • count() and ranges::count. #6049
      • adjacent_find() and ranges::adjacent_find. #6066
      • mismatch() and ranges::mismatch. #6075
      • includes() and ranges::includes. #6076
      • replace_copy() and ranges::replace_copy. #6090
      • find_first_of() and ranges::find_first_of. #6094 #6115 #6144
        • Also basic_string and basic_string_view's find_first_of() and find_first_not_of() member functions.
      • search_n() and ranges::search_n. #6108
      • find_end(), search(), ranges::find_end, and ranges::search. #6139
      • basic_string and basic_string_view's find_last_of() and find_last_not_of() member functions. #6141
      • remove(), remove_copy(), unique(), unique_copy(), and their ranges counterparts. #6143
      • bitset::to_string() and operator<<(basic_ostream&, const bitset&). #6153
      • bitset's constructors from strings and operator>>(basic_istream&, bitset&). #6167
    • Added ARM64 processor feature detection for future vectorized algorithms. #6067
    • Improved the x64/x86 vectorized implementations of:
      • search_n() and ranges::search_n. #5544
      • mismatch() and ranges::mismatch. #5591
      • count(), find(), find_last(), remove(), remove_copy(), replace(), and their ranges counterparts. #5767
      • basic_string and basic_string_view's family of find_meow_of() member functions. #6080
    • Improved the vectorized algorithms for custom builds of the STL. #6098
    • Optimized any::swap() by avoiding unnecessary copies. #5710
    • Optimized transform() for vector<bool> with the unary function object logical_not and the binary function objects logical_and, logical_or, equal_to, not_equal_to, less, less_equal, greater, and greater_equal. #5769 #5796
    • Optimized all_of(), any_of(), and none_of() for vector<bool> with the function objects identity and logical_not. #5802
    • Constructing a move_only_function from a std::function now avoids double-wrapping. #5808 #5919 #5917 #6031
    • Optimized steady_clock::now() to more efficiently convert from a performance counter frequency of 24 MHz (commonly seen on ARM64 systems) to nanoseconds. #5832
    • Optimized to_string(), to_wstring(), and to_chars() for integers by printing digits in pairs. #5691 #6007
    • The STL is now optimized for speed instead of size. #6110
    • Improved the all-bits-zero optimization in the fill() family. #6145
    • Improved the uninitialized_copy() algorithm family to call memcpy() instead of memmove() when possible, enabling certain compiler optimizations. #6161
  • Enhanced behavior:
    • For C++20, enabled P2404R3 Move-Only Types For Comparison Concepts. #5928
      • This was originally implemented for C++23 by #3345 in VS 2022 17.6.
    • Unconditionally enabled LWG-3187 for uses-allocator construction.
      • This was originally implemented for C++20 by #1668 in VS 2019 16.10.
    • Deprecated the non-Standard <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> headers. #5804
    • Removed the confusing escape hatch macro _ALLOW_RTCc_IN_STL. The STL doesn't support the /RTCc compiler option because it rejects conformant code with runtime termination. Previously, the STL blocked /RTCc with a compiler error, but provided an escape hatch macro to suppress that compiler error (so that compile-time STL components, like <type_traits>, could theoretically be used). This escape hatch intentionally did nothing to the STL's conformant code that would attempt to avoid runtime termination, occasionally confusing users. Now that the escape hatch has been removed, users must remove the /RTCc compiler option. #5906
      • Note: The /RTCs and /RTCu compiler options (combined into /RTC1) are good and unaffected. They only complain about undefined behavior, and the STL is perfectly compatible with them.
    • Implemented compiler warnings when the Standard forbids user-defined specializations of Standard Library templates. #5536 #5937
      • This uses the recently-implemented attributes [[msvc::no_specializations("reason")]] and [[clang::no_specializations("reason")]].
    • Silenced spurious static analysis warnings in vector<bool>::max_size(). #5707
    • Silenced CodeQL warnings. #5711
    • Improved <random>'s engines and distributions to no longer derive from their non-Standard TR1 predecessors. #5712
    • Updated tuple to apply the resolution of LWG-3677 "Is a cv-qualified pair specially handled in uses-allocator construction?". #5669
      • This was originally implemented for pair by #3396 in VS 2022 17.7.
    • Updated <format> to handle Unicode 17. #5571 #5803
    • Updated the Standard Library Modules, when used with the UCRT from the Windows 11 SDK 10.0.26100.6901 or newer, to remove a workaround that affected various <ctime> functions. #5805
    • Updated C++23 move_only_function to prepare for future interactions with C++26 features. #5849
    • Improved is_clock_v to perform stricter checks beyond the Standard's minimum requirements. #5892
    • Improved the accuracy of poisson_distribution and binomial_distribution by calling the UCRT's lgamma() function instead of highly inaccurate handwritten code. #5891
    • Improved num_put::do_put() to avoid any possibility of casting a negative sprintf_s() return value to size_t. #5925
    • Silenced the off-by-default warning C4365 (signed/unsigned mismatch) when compiling vector<bool> with the highly unusual compiler option /J. #6013
      • In general, the STL does not attempt to be clean with respect to off-by-default warnings, but we occasionally address them on a case-by-case basis.
    • Prevented non-Standard construction of the comparison category types partial_ordering, weak_ordering, and strong_ordering. #5911
    • Added ASan annotations to optional<T> for non-trivially-destructible T. #6010
    • Added compiler bug workarounds. #6177
    • Changed unreachable() to always fastfail in debug mode. #6159
  • Improved debugger visualization:
    • Added a c_str() intrinsic function to basic_string's visualizer, allowing conditional breakpoints like strcmp(cat_name.c_str(), "Juliette Andromeda Meow") == 0. #5997
    • Added visualizers for more comparison function objects. #6016
    • Improved visualizers for various iterators. #6019
    • Added visualizers for <mdspan> extents. #6053
  • Improved test coverage:
    • Enabled ARM64EC test coverage for Clang. #5717
    • Removed /analyze from the libcxx test suite to reduce compiler memory consumption, as we have sufficient test coverage elsewhere. #5724
    • Fixed bogus tests for the most triumphant type trait functions is_corresponding_member() and is_pointer_interconvertible_with_class(). #5730 #5737
    • Added test coverage for constexpr vector<bool>. #5728
    • Reactivated test coverage using Clang's Undefined Behavior Sanitizer (UBSan). #5746
    • Improved test coverage for <filesystem>. #5749
    • Added test coverage for <filesystem>'s long path support. #5783 #5799
    • Added benchmarks for <charconv>'s floating-point to_chars(). #5700
    • Centralized test machinery for exercising code with varying levels of Instruction Set Architecture (ISA) extensions, and added assertions to verify that tests are being run on machines that actually support the highest level of ISA extensions being used. #5874
    • Updated our LLVM submodule, including new tests. #5888 #5955 #6006 #6058 #6109
    • Improved messages for syntax errors in expected test results. #5948 #6002
    • Updated tests for upcoming compiler changes. #5960 #6111
    • Added test coverage to ensure that various Standard headers (e.g. <vector>) provide the iterator range access functions (e.g. non-member begin() and end()). #5968
    • Categorized some test failures in the libcxx test suite. #6073 #6136
    • Enabled tests after an x86-specific ASan bug was fixed. #6083
    • Added ARM64 ASan test coverage. #6095 #6157 #6163
    • Added test coverage for a <regex> regression that was fixed before it shipped. #6122
    • Updated test coverage to handle the /Zc:alignedNew- compiler option, although without adding regular configurations for it. #6087
    • Added test coverage for vectorized algorithms that are only used when mixing x64 and ARM64EC object files. #6107 #6142 #6182
  • Improved documentation:
  • Code cleanups:
    • Reduced code duplication for:
    • Removed compiler bug workarounds. #5717 #5783 #5809 #6012 #6095 #6157
    • Fixed a typo. #5713
    • Reworked internal macros to make it easier to add vectorized algorithms for ARM64. #5801 #6101
    • Cleaned up the separately compiled implementations of vectorized algorithms:
      • Added template and typename keywords as required by the Standard. #5743
      • Removed unused functions. #5744
      • Avoided unnecessary unaligned memory accesses in bitset's constructors from strings. #5759
      • Avoided unnecessary unaligned memory accesses in swap_ranges(), ranges::swap_ranges, rotate(), and ranges::rotate. #5760
      • Removed a bogus assumption (which was fortunately harmless). #5761
      • Added const and increased consistency for detecting 64-bit architectures. #6089
      • Added [[nodiscard]]. #6192
    • Various cleanups (described in detail in the PRs, not repeated here). #5753 #5922 #5924 #6183
    • Simplified <any>'s implementation. #5784
    • Updated the STL's internal implementation to be compatible with .NET 8.0. #5814
    • Deleted dozens of files containing thousands of lines of unnecessary code for floating-point functions. #5836 #5959
    • Avoided compiler warnings in the STL's separately compiled source files. #5875 #5876
    • Removed comments that were citing proposed resolutions for LWG issues, now that those issues have been officially resolved by the November 2025 meeting. #5909
    • Simplified how <chrono> formatting validates modifier characters. #5905
    • Improved zoned_time's constructors to be constrained with concepts instead of SFINAE. #5907
    • Used if constexpr to simplify:
      • Locale helper functions. #5923
      • lock() and try_lock(). #5941
    • Simplified <atomic>'s implementation by using bit_cast(). #5973
    • Changed <cmath>'s implementations of lerp() for long double to be consistent with other functions. #6021
    • Simplified internal macros for [[nodiscard]]. #6061
  • Infrastructure improvements:
    • Added ARM64 runtime test coverage. #5815
    • Added ARM64EC runtime test coverage. #5831
    • Added a Configure Tests stage to Azure Pipelines, validating that test paths are properly listed in various files. #5888
    • Improved CI reliability by not building the benchmarks with Clang for x86. #5704
      • This avoids a sporadic crash in lld-link.exe.
    • Updated the CI to print a histogram of test run times and a list of the slowest running tests. #5878
    • Updated the CI to use a limited number of compute-optimized Fasv7 VMs. #6106
    • Updated dependencies. #5717 #5783 #5879 #5888 #5955 #6011 #6058 #6095 #6157
      • Updated MSVC Compiler to 19.51.36122 (now required).
      • Updated Clang to 20.1.8 (now required).
      • Updated CMake to 4.2.3 (now required).
      • Updated Python to 3.14.3 (now required).
      • Updated Boost.Math to 1.90.0.
      • Updated Google Benchmark to 1.9.5.
      • Updated CUDA to 13.2 (now required).
  • Build system improvements:
    • Added compiler and linker options to the GitHub CMake build system, fixing divergence with the MSVC-internal MSBuild build system. #5652
    • The STL now clearly rejects attempts to build a preset or test a build whose architecture doesn't match the Developer Command Prompt (which is x86-native, but very slightly different from the x86 Native Tools Command Prompt where enforcement was previously validated). #5731
  • Updated _MSVC_STL_UPDATE. #5709 #5752 #5822 #5930 #5985 #6063 #6126 #6193