Skip to content

MSVC Build Tools 14.50

Latest

Choose a tag to compare

@StephanTLavavej StephanTLavavej released this 14 Nov 23:38
· 129 commits to main since this release
37d575e

This shipped in VS 2026 18.0.

  • The STL no longer supports targeting Windows 7 / Server 2008 R2, Windows 8 / Server 2012, and Windows 8.1 / Server 2012 R2:
    • Improved the performance of system_clock::now() and atomic::wait() by directly calling APIs that were added in Windows 8. #5432 #5496
    • Improved the performance of STL Hardening by using the MSVC __fastfail intrinsic that was added in Windows 8, and the Clang __builtin_verbose_trap intrinsic. #5433 #5458
    • Simplified the <filesystem> implementation by unconditionally calling APIs that were added in Windows 8. #5434
    • Windows 10 / Server 2016 are our minimum supported operating systems. #5510
  • The STL no longer supports targeting 32-bit ARM. #5594
  • Merged C++26 features:
  • Merged partial C++26 features:
    • P3697R1 #5650 Minor Additions To Standard Library Hardening
  • Merged LWG issue resolutions:
    • LWG-2503 #5535 multiline option should be added to syntax_option_type
      • For us, this is a regex behavioral change, so we added an escape hatch. By default, we define _REGEX_LEGACY_MULTILINE_MODE to 0, which requests Standard behavior:
        • For ECMAScript, matching is non-multiline by default, but regex_constants::multiline can be requested.
        • For POSIX grammars, matching is non-multiline, and regex_constants::multiline is ignored; see N5008 [tab:re.synopt].
      • Defining _REGEX_LEGACY_MULTILINE_MODE to 1 requests legacy behavior:
        • For all grammars, matching is multiline, and regex_constants::multiline is redundant.
    • LWG-4186 #5444 regex_traits::transform_primary mistakenly detects typeid of a function
    • LWG-4222 #5602 expected constructor from a single value missing a constraint
    • LWG-4242 #5603 ranges::distance does not work with volatile iterators
  • Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
    • LWG-4270 #5572 Diagnose misuse of std::projected::operator*
    • LWG-4273 #5578 Standard execution policy types should be conventional tag class types
    • LWG-4303 #5603 std::decay_t in the specification of ranges::distance is problematic
  • Fixed bugs:
    • Fixed regex's behavior:
      • For the basic and grep grammars to properly handle ^ caret characters. #5165
      • For the basic and grep grammars to properly handle $ dollar characters. #5362
      • For the basic and grep grammars to make backreferences to unmatched capture groups fail to match anything, instead of matching the empty string "". #5376
      • For the basic and grep grammars to properly handle backslashes inside square-bracket character classes. #5523
      • For POSIX grammars to allow a ] right square bracket at the beginning of a character range. #5364
      • For POSIX grammars to avoid resetting matched capture groups. #5377
      • For the ECMAScript grammar's (?!pattern) negative lookahead assertions to make capture groups within them always match nothing after the assertions succeed. #5366
      • For the ECMAScript grammar's \b word boundary assertion to not match the empty string "" (and inversely for the \B negative word boundary assertion). #5375
      • For the ECMAScript grammar's \c escapes to require the following ControlLetter to be an ASCII alphabetic character. #5524
        • That is, only \ca through \cz and \cA through \cZ are allowed.
      • For the ECMAScript grammar to reset all capture groups to "unmatched" at the start of each repetition of a loop. #5456
      • For the ECMAScript grammar to reject bogus groups by throwing a regex_error with the code regex_constants::error_badrepeat, removing the non-Standard code regex_constants::error_syntax that was previously used. #5542
        • That is, only non-capture groups (?:meow) and positive/negative lookahead assertions (?=meow)/(?!meow) are allowed; other characters following (? are bogus. Notably, the C++ Standard doesn't support the lookbehind assertions (?<=meow)/(?<!meow) that were added in later versions of ECMAScript.
      • For the ECMAScript, basic, grep, and awk grammars to properly handle escape sequences. #5380
        • POSIX grammars now accept \] as an identity escape for a right square bracket. #5399
      • For capture groups to follow ECMAScript's depth-first and POSIX's leftmost-longest matching rules. #5218
        • Removed unnecessary code for POSIX's leftmost-longest rule, reducing stack space consumption. #5405
      • For empty matches to follow ECMAScript's and POSIX's slightly different rules. #5494
      • For negated character class escapes (\D for non-digits, \S for non-whitespace, \W for non-words) inside square-bracket character classes when matching against Unicode characters. #5403 #5487
        • This completes a series of fixes started by #5160 and #5214 in VS 2022 17.14.
      • For combinations of character class escapes inside square-bracket character classes (like [\w\s] for words and whitespace) when matching against Unicode characters. #5438
      • For character ranges with regex_constants::collate to follow the locale's collation order. #5238
      • For collating symbols and equivalence classes. #5392 #5444
      • For small character ranges containing U+00FF and U+0100. #5437
      • For regex_constants::icase and regex_constants::collate to translate each character exactly once before any comparisons. #5553
      • For extremely unusual user-defined character types. #5592 #5675
      • To avoid requiring non-Standard typedefs in custom regex traits classes. #5671
    • Fixed collate<wchar_t> to follow the locale's collation order when compiling with /Zc:wchar_t- (making wchar_t a non-Standard typedef for unsigned short) and linking to the STL dynamically (with /MD or /MDd). #5361
    • Fixed how collate::do_transform() handles wrongly encoded input. #5431
    • Fixed collate::do_hash() to return equal hashes for strings that collate as equivalent. #5469
    • Fixed ranges::enable_view to correctly report false for ranges::view_interface itself. #5369 #5407
    • Fixed <filesystem> status functions to avoid failing for invalid paths when the current directory is a network path. #5381
    • Fixed compiler errors in repeat_view's piecewise constructor for certain scenarios. #5388
    • Fixed compiler errors in constexpr copy() for vector<bool>. #5347
      • This fixed a regression that was introduced by #3353 in VS 2022 17.9.
    • Fixed the barrier constructor's exception specification to be conditionally "strengthened", instead of unconditionally. #5398
    • Fixed heap-use-after-free bugs in our undocumented/quasi-supported _HAS_EXCEPTIONS=0 mode when constructing system_error, chrono::ambiguous_local_time, and chrono::nonexistent_local_time. #5406
    • Fixed compiler errors when passing volatile ranges to basic_string's from_range constructor and append_range(), assign_range(), insert_range(), and replace_with_range() member functions. #5409
    • Fixed nth_element() and ranges::nth_element to have worst-case linear complexity, instead of quadratic. #5100
    • Fixed compiler errors when passing iterators with unusual integer-class difference types to vectorized algorithms. #5471
    • Fixed destroy(), destroy_at(), destroy_n(), ranges::destroy, ranges::destroy_at, and ranges::destroy_n to destroy objects during constant evaluation even when they're trivially destructible. #5449
    • Fixed num_get::do_get() for bool to properly handle bad digit groupings. #5476
    • Fixed thread::hardware_concurrency() to correctly report the total number of logical processors when more than 64 are available, for both single-socket and multi-socket machines. #5459
    • Fixed <mdspan>'s layout_stride::mapping<E>::is_exhaustive() to correctly handle unusual extents. #5477
    • Fixed reverse_copy() and ranges::reverse_copy being improperly vectorized for pair<T&, U&> on x86 (where such pairs are 8 bytes). #5528
      • This fixed a regression that was introduced by #804 in VS 2019 16.8.
    • Fixed chrono::zoned_time to provide a fallback time zone abbreviation (of the form "-05" or "+0530") when the system's code page can't represent the localized abbreviation that would normally be returned. #5558
    • Fixed counting_semaphore::try_acquire_for() to consistently use steady_clock. #5575
    • Silenced a static analysis warning C6510 emitted by the extremely unusual scenario of basic_string<char_like_struct>. #5563
    • Fixed compiler errors involving incomplete types in <chrono>. #5629
    • Fixed occurrences of Clang 21's new -Wcharacter-conversion warning in <locale> by avoiding implicit conversions between charN_t types. #5653
    • Fixed integer overflow in stable_sort() and ranges::stable_sort when sorting huge inputs on x86. #5677
      • This affected 32-bit architectures with over a billion 1-byte elements. 64-bit architectures were immune.
      • This fix was backported to VS 2022 17.14.20.
    • Fixed filesystem::temp_directory_path(error_code&) to return an empty filesystem::path when an error is encountered. #5570
  • Improved performance:
    • Improved performance for regex matching:
      • When a regex starts with a ? question mark quantifier or several alternatives, by avoiding quadratic complexity. #5457
      • When a regex starts with a + plus quantifier (or {min,} or {min,max} quantifiers requiring at least 1 repetition). #5509
      • When a regex contains no capture groups, by avoiding unnecessary allocations. #5518
      • For all regex patterns, by not generating unnecessary "if" nodes with a single branch. #5539
      • When a regex starts with positive/negative word boundary assertions \b/\B and lookahead assertions (?=meow)/(?!meow). #5576
      • By calling std::search() internally. #5586
      • By avoiding unnecessary work in regex_constants::collate mode. #5672
    • Started using [[msvc::no_unique_address]] as a space optimization in several C++23 components. #4960
    • Added x64/x86 vectorized implementations of:
      • basic_string::find_first_not_of() and basic_string::find_last_not_of() for one character. #5102
      • basic_string::find_first_not_of() and basic_string::find_last_not_of() for multiple characters. #5206
      • adjacent_find() and ranges::adjacent_find. #5331
      • unique() and ranges::unique. #5092 #5363
      • search_n() and ranges::search_n for small values of n. #5352
      • remove_copy(), ranges::remove_copy, unique_copy(), and ranges::unique_copy. #5355
      • is_sorted_until() and ranges::is_sorted_until. #5420 #5540
      • search(), ranges::search, default_searcher, find_end(), and ranges::find_end, for 4-byte and 8-byte elements. #5484 #5519
        • They were vectorized for 1-byte and 2-byte elements in VS 2022 17.13.
      • rotate() and ranges::rotate. #5502 #5525
    • Improved the x64/x86 vectorized implementations of:
      • reverse_copy() and ranges::reverse_copy. #5493
    • Improved the ARM64EC vectorized implementations of:
      • find() and ranges::find. #5597
    • Improved the performance of ranges::find for 2-byte elements on ARM64, matching find()'s behavior. #5628
    • Used Clang's builtin __is_trivially_equality_comparable to improve the performance of equal(), ranges::equal, and many vectorized algorithms for more types. #5527
    • Optimized search_n() and ranges::search_n for n=1 to internally call find() and ranges::find. #5346
    • Improved codegen for has_single_bit(), especially when popcount() intrinsics are unconditionally available. #5367 #5534
      • For example, x86/x64 with /arch:AVX and ARM64 can unconditionally use popcount() intrinsics.
    • Optimized poisson_distribution's constructor by avoiding unnecessary work. #5411
    • Implemented an exponential speedup (yes, literally) for minstd_rand and minstd_rand0's discard() member function. #5412
    • Improved linear_congruential_engine performance by using our modern internal implementation of 128-bit integers. #5436 #5473
    • Significantly improved performance for chrono::tzdb::locate_zone() by using binary searches for time zone names. #5548
    • Improved std::includes() to have the same performance as ranges::includes. #5543 #5595
    • Improved the performance of count() for vector<bool>. #5640
  • Enhanced behavior:
    • Used a new Clang compiler intrinsic to implement is_scoped_enum. #5358
    • Added debug checks for overlapping ranges in replace_copy(), replace_copy_if(), reverse_copy(), rotate_copy(), and their ranges counterparts. #5495
    • Improved <mdspan>'s debug checks in layout_stride::mapping<E>'s constructor. #5505
    • Avoided compiler warnings in vector<bool>::max_size() with the compiler's upcoming implementation of Defect Report P2280R4. #5550 #5566
    • Updated several checks for precondition violations and impossible situations to use the STL's usual error reporting mechanism. #5560
    • Improved regex parsing to detect excessive recursion (caused by extreme numbers of non-capturing groups or lookahead assertions) and throw a regex_error with the code regex_constants::error_stack. #5588
    • Changed <regex> matching to use heap allocations for saved match state, slightly reducing stack pressure. #5682
    • Silenced CodeQL warnings. #5625
    • Silenced a new compiler warning C5291 throughout the STL. #5645
  • Improved debugger visualization:
    • Fixed an off-by-one mistake in the displayed year for system_clock::time_point. #5389
    • Updated the visualizer for system_clock::time_point to recognize the synonymous but slightly different type name emitted by Clang. #5390
  • Improved test coverage:
    • Updated our LLVM submodule, including new tests. #5349 #5467 #5688
    • Changed the benchmark build from /O2 /Ob1 to /O2 /Ob2, producing more realistic and useful results. #5370
    • Added benchmarks for:
      • fill() and fill_n(). #5400
      • reverse() and reverse_copy(). #5493
      • The count() optimization for vector<bool>. #5684
    • Improved the consistency of how normal_distribution is used in benchmarks and tests. #5404
    • Increased the consistency of several benchmarks by adding allocators to control alignment. #5443
    • Updated the benchmarks to support being built with Clang. #5533
    • Updated an iter_rvalue_reference_t test in response to a compiler change. #5378
    • Fixed sporadic test failures by avoiding excessive compiler memory consumption. #5383
    • Improved the runtime performance of the major test for vectorized algorithms. #5425
    • Added more test coverage for search_n() and ranges::search_n. #5439 #5440
    • Updated the test harness to properly detect the locale name "Czech_Czechia.1250". #5480
    • Updated source_location test coverage to handle upcoming changes in the EDG front-end used for IntelliSense. #5551
    • Categorized the remaining <regex> test failures in the libcxx suite. #5587
    • Avoided/suppressed compiler warnings in tests. #5654 #5655 #5656 #5657 #5676
    • Worked around assertions in the lerp() test on ARM64. #5687
  • Improved documentation:
    • Clarified our machine-searchable SPDX-License-Identifier comments to properly describe how we used Ryu to implement <charconv>. #5401
    • Fixed confusing comments around the control macro for vectorizing algorithms with floating-point types. #5417
  • Code cleanups:
    • Simplified the control flow in ranges::search_n. #5343
    • Simplified the implementation of regex quantifiers. #5253
    • Removed comments that were citing proposed resolutions for LWG issues, now that those issues have been officially resolved by the November 2024 and June 2025 meetings. #5360 #5584
    • Removed compiler bug workarounds. #5410 #5580 #5634 #5661 #5674
    • Significantly cleaned up the implementation of x64/x86 vectorized algorithms. #5429 #5450 #5485 #5532
    • Removed an unnecessarily verbose internal macro. #5475
    • Removed unnecessary code for constant evaluation in char_traits::assign(). #5488
    • Various cleanups (described in detail in the PRs, not repeated here). #5498 #5500 #5541 #5565 #5636
    • Restructured code to if constexpr (condition) { ... } else { ... }, improving clarity and avoiding unreachable code. #5643
    • Simplified how <chrono> initializes a tm struct. #5662
  • Infrastructure improvements:
    • Added ARM64EC stages to Azure Pipelines. #5492 #5517 #5521
      • Including an Early Build, benchmarks, and tests.
    • Improved code format validation to report line numbers in error messages. #5559
    • Updated dependencies. #5370 #5410 #5478 #5512 #5530 #5580 #5641 #5659 #5674
      • Updated build compiler to VS 2022 17.14.12 Preview 1.
      • Updated CMake to 3.31 (now required).
      • Updated Google Benchmark to 1.9.4.
      • Updated Python to 3.13.6.
      • Updated to Windows 11 SDK 26100. This is now required for building and testing the STL, but not for using it.
  • Updated _MSVC_STL_UPDATE and _MSVC_STL_VERSION. #5385 #5464 #5568 #5633 #5664