·
38 commits
to main
since this release
This shipped in VS 2026 18.6.
- Removed non-Standard features:
- TR1, including the
std::tr1namespace, the oldarray::assign()member function, the old<random>engines, and the old<random>distributionsuniform_intanduniform_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_iteratorandstdext::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()andbasic_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.
- TR1, including the
- Merged C++26 features:
- 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_asAndstart_lifetime_as_array - Initially supported for MSVC only. (Clang and EDG support will be enabled when the necessary compiler builtins become available.)
- P2679R2 Fixing
- 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.)
- P0429R9 #6071
- Merged C++20 Defect Reports:
- 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_compatibleandis_pointer_interconvertible_base_ofare now implemented for Clang, as the necessary compiler builtins recently became available. #5621is_pointer_interconvertible_with_class()andis_corresponding_member()remain to be implemented for Clang, as the necessary compiler builtins are not yet available.
- P0466R5 Layout-Compatibility And Pointer-Interconvertibility Traits
- 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()andnotify_all()in Effects element ofnotify_all_at_thread_exit()should be reversed - LWG-3436 #5920
std::construct_atshould support arrays - LWG-3617 #5921
function/packaged_taskdeduction guides and deducingthis - LWG-4015 #6102 LWG-3973 broke
constoverloads ofstd::optionalmonadic operations - LWG-4037 #6079 Static data members of
ctype_baseare not yet required to be usable in constant expressions - LWG-4243 #5867
as_bytes/as_writable_bytesis broken withspan<volatile T> - LWG-4253 #5868
basic_const_iteratorshould provideiterator_type - LWG-4257 #5895 Stream insertion for
chrono::local_timeshould be constrained - LWG-4266 #5880
layout_stride::mappingshould treat empty mappings as exhaustive - LWG-4272 #5900 For
rank == 0,layout_strideis atypically convertible - LWG-4274 #5893 The
chrono::hh_mm_ssconstructor 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_argin the description of uses-allocator construction - LWG-4366 #5896 Heterogeneous comparison of
expectedmay be ill-formed - LWG-4398 #5883
enable_nonlocking_formatter_optimizationshould be disabled for container adaptors - LWG-4399 #5897
enable_nonlocking_formatter_optimizationforpairandtupleneedsremove_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 aregex_errorwhen 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 updatematch_resultsfor a default-constructedbasic_regex. #6185
- Fixed
- 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
atomicbehavior. #5708 - Fixed the
vector<bool>optimization forcopy()to avoid a forbidden negative shift in a specific scenario. #5726 - Fixed
independent_bits_engineto avoid forbidden full shifts in specific scenarios. #5740 - Fixed compiler errors in
vectorwhen 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_stringfor allocators with unusualsize_types. #5562 #5775 - Fixed a crash in the x64/x86 vectorized implementations of
wstring::find_first_of()andwstring::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 returndbl * dblas a special case, working around an accuracy issue in UCRT::pow()that affects ~0.04% ofdoublevalues. #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-bitdouble. UCRT::pow(x, 2.0)returns 0.92566491420638608023097049226635135710239410400390625 (hexfloat0x1.d9f0c06b2463dp-1), butx * xreturns 0.9256649142063861912532729547820053994655609130859375 (hexfloat0x1.d9f0c06b2463ep-1). Thedoublevalue ofx * xis 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(), andinplace_merge()to handle over-aligned elements by default. #5807 - Fixed
ranges::partitionto meet the Standard's complexity requirements for bidirectional non-common ranges. #5887 - Fixed the
noexceptspecification of an internal helper function for debug checks of strict weak orderings, affecting extremely unusual comparison function objects with non-boolreturn 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 fordurations with unsigned representation types. #5947 - Fixed
piecewise_constant_distribution,piecewise_linear_distribution, and theirparam_types to avoid inheriting fromdiscrete_distributionand itsparam_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()(andfilesystem::copy()withoverwrite_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()andput_money()to enforce the Standard's type requirements forlong doubleorbasic_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 withexplicitcopy 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.
- This involved the
- Fixed
time_get::do_get()to properly handle the conversion specifications: - Fixed
num_put::do_put()to avoid relying onfrexp()'s unspecified behavior for infinity and NaN. #6168
- Massively overhauled
- 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, andranges::shuffleby using Daniel Lemire's algorithm Fast Random Integer Generation in an Interval.- This was originally implemented for
uniform_int_distributionby #3012 in VS 2022 17.5.
- This was originally implemented for
- Added x64/x86 vectorized implementations of:
- Added ARM64/ARM64EC vectorized implementations of: #6084
swap_ranges()andranges::swap_ranges. #5819rotate()andranges::rotate. #5845reverse(),reverse_copy(),ranges::reverse, andranges::reverse_copy. #5870min_element(),max_element(),minmax_element(),ranges::min_element,ranges::max_element, andranges::minmax_element. #5949 #6194min(),max(),minmax(),ranges::min,ranges::max, andranges::minmax. #5963find()andranges::find. #6003is_sorted_until()andranges::is_sorted_until. #6018ranges::find_last. #6030count()andranges::count. #6049adjacent_find()andranges::adjacent_find. #6066mismatch()andranges::mismatch. #6075includes()andranges::includes. #6076replace_copy()andranges::replace_copy. #6090find_first_of()andranges::find_first_of. #6094 #6115 #6144- Also
basic_stringandbasic_string_view'sfind_first_of()andfind_first_not_of()member functions.
- Also
search_n()andranges::search_n. #6108find_end(),search(),ranges::find_end, andranges::search. #6139basic_stringandbasic_string_view'sfind_last_of()andfind_last_not_of()member functions. #6141remove(),remove_copy(),unique(),unique_copy(), and theirrangescounterparts. #6143bitset::to_string()andoperator<<(basic_ostream&, const bitset&). #6153bitset's constructors from strings andoperator>>(basic_istream&, bitset&). #6167
- Added ARM64 processor feature detection for future vectorized algorithms. #6067
- Improved the x64/x86 vectorized implementations of:
- Improved the vectorized algorithms for custom builds of the STL. #6098
- Optimized
any::swap()by avoiding unnecessary copies. #5710 - Optimized
transform()forvector<bool>with the unary function objectlogical_notand the binary function objectslogical_and,logical_or,equal_to,not_equal_to,less,less_equal,greater, andgreater_equal. #5769 #5796 - Optimized
all_of(),any_of(), andnone_of()forvector<bool>with the function objectsidentityandlogical_not. #5802 - Constructing a
move_only_functionfrom astd::functionnow 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(), andto_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 callmemcpy()instead ofmemmove()when possible, enabling certain compiler optimizations. #6161
- Improved
- 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/RTCccompiler option because it rejects conformant code with runtime termination. Previously, the STL blocked/RTCcwith 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/RTCccompiler option. #5906- Note: The
/RTCsand/RTCucompiler options (combined into/RTC1) are good and unaffected. They only complain about undefined behavior, and the STL is perfectly compatible with them.
- Note: The
- 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")]].
- This uses the recently-implemented attributes
- 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
tupleto apply the resolution of LWG-3677 "Is a cv-qualifiedpairspecially handled in uses-allocator construction?". #5669- This was originally implemented for
pairby #3396 in VS 2022 17.7.
- This was originally implemented for
- 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_functionto prepare for future interactions with C++26 features. #5849 - Improved
is_clock_vto perform stricter checks beyond the Standard's minimum requirements. #5892 - Improved the accuracy of
poisson_distributionandbinomial_distributionby calling the UCRT'slgamma()function instead of highly inaccurate handwritten code. #5891 - Improved
num_put::do_put()to avoid any possibility of casting a negativesprintf_s()return value tosize_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, andstrong_ordering. #5911 - Added ASan annotations to
optional<T>for non-trivially-destructibleT. #6010 - Added compiler bug workarounds. #6177
- Changed
unreachable()to always fastfail in debug mode. #6159
- For C++20, enabled P2404R3 Move-Only Types For Comparison Concepts. #5928
- Improved debugger visualization:
- Added a
c_str()intrinsic function tobasic_string's visualizer, allowing conditional breakpoints likestrcmp(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
- Added a
- Improved test coverage:
- Enabled ARM64EC test coverage for Clang. #5717
- Removed
/analyzefrom 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()andis_pointer_interconvertible_with_class(). #5730 #5737 - Added test coverage for
constexprvector<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-pointto_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-memberbegin()andend()). #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
templateandtypenamekeywords 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(), andranges::rotate. #5760 - Removed a bogus assumption (which was fortunately harmless). #5761
- Added
constand increased consistency for detecting 64-bit architectures. #6089 - Added
[[nodiscard]]. #6192
- Added
- 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 constexprto simplify: - Simplified
<atomic>'s implementation by usingbit_cast(). #5973 - Changed
<cmath>'s implementations oflerp()forlong doubleto 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