Releases: microsoft/STL
Releases · microsoft/STL
VS 2022 17.5
- Merged C++23 features:
- P2322R6 #3099
ranges::fold_left,ranges::fold_right, etc. - P2465R3 #3108 Standard Library Modules
stdAndstd.compat- Initially supported for MSVC only; see tracking issue #1694 for lists of known compiler bugs and upcoming fixes.
- Build system support is a work in progress; currently, build systems must be manually taught to compile
std.ixxso you can referencestd.ifcand linkstd.obj. (Similarly for buildingstd.compat.ixxintostd.compat.ifcandstd.compat.obj.) - IntelliSense support is a work in progress; STL test coverage is not yet enabled.
- Will be supported for Clang after compiler support for modules is available; see Clang's C++20 implementation status.
- P2508R1 #3074
basic_format_string,format_string,wformat_string
- P2322R6 #3099
- Merged partial C++23 features:
- P2278R4
cbeginShould Always Return A Constant Iterator:- The "Iterators" section, including
basic_const_iterator,make_const_iterator(), andmake_const_sentinel(). #3043
- The "Iterators" section, including
- P2321R2
zip:views::zip. #3035- Note:
views::zip_transform,views::adjacent, andviews::adjacent_transformare the parts that remain to be implemented.
- P2278R4
- Merged LWG issue resolutions:
- Fixed bugs:
- Fixed compiler warnings when using Standard Library Header Units. #3069
- Removed a non-Standard member function
locale::c_str(). #3088 - Fixed narrowing warnings when calling
piecewise_constant_distribution<float>::densities()andpiecewise_linear_distribution<float>::densities(). #3107 - Fixed compiler errors when calling
ranges::is_permutationwith predicates that return highly unusual boolean-testable types. #3113 - Fixed compiler errors when building the Standard Library Modules with static RTTI disabled. #3115
- Now, building
std.ixxwith/GR- /D_HAS_STATIC_RTTI=0will succeed, andstd::anywill simply be unavailable (as it inherently requires static RTTI). - Additionally, including
<any>with static RTTI disabled will emit a warning message but not an error, and the feature-test macro__cpp_lib_anywill indicate (by its absence) that the feature is unavailable.
- Now, building
- Fixed compiler errors in
reference_wrapper,thread, andvariantinvolving incomplete types. #3101 #3148 - When
chrono::time_zone::get_info()throws an exception, fixed it to reportGetLastError()as intended, instead of"The operation completed successfully."#3122 - Fixed incorrect results returned by
ellint_2(). #3077 - Fixed
error_category's default constructor to beconstexpr. #3139 #3176 - Fixed all headers to avoid emitting the off-by-default "warning C5262: implicit fall-through occurs here; are you missing a
breakstatement? Use[[fallthrough]]when abreakstatement is intentionally omitted betweencases". #3162 - Fixed compiler errors in certain
<ranges>scenarios by properly constrainingmovable-box's copy constructors. #3171
- Improved performance:
- Added support for unwrapping to
move_sentinel. #3098 - Improved the performance of
uniform_int_distributionby implementing Daniel Lemire's algorithm Fast Random Integer Generation in an Interval. #3012 - Optimized
gcd()to avoid a redundant shift. #3127 - Optimized
locale::classic()for a 10x speedup (times, not percent). #3048 - Added an attribute to
move(),forward(),move_if_noexcept(), andforward_like()that will allow the MSVC compiler to intrinsically implement them without emitting function calls. #3182
- Added support for unwrapping to
- Improved throughput:
- Enhanced behavior:
- Clarified
get_future()'s[[nodiscard("message")]]. #3068 - The internal headers
<xatomic.h>,<xbit_ops.h>, and<xerrc.h>are now core headers. #3116 - Improved
<format>'s compiler error messages for unformattable types. #3080
- Clarified
- Improved test coverage:
- Added test coverage for
<variant>visit()invoking pointers to members. #3070 - Expanded test coverage for
forward_like(). #3072 - Updated test coverage for
views::as_rvalue. #3089 - Expanded test coverage for
bind_front()andbind_back(). #3117 - Updated our LLVM submodule reference, including new tests, and updates to the
any/optional/variantshared test code. #2976 - Fixed bogus test code discovered by Clang 15. #3135
- Fixed the off-by-default "exhaustive" mode of the parallel
is_partitioned()test. #3174
- Added test coverage for
- Code cleanups:
- Various cleanups (described in detail in the PRs, not repeated here). #3082 #3083 #3084 #3085 #3086 #3090 #3091 #3092 #3093 #3177 #3178
- Improved Python scripts. #3123
- Removed compiler bug workarounds. #3155
- Moved
<atomic>implementation details, preparing for later changes. #3124 - Removed unnecessary partial specializations of
common_typefor the STL's internal 128-bit integer-class types. #3153
- Infrastructure improvements:
- Updated
_MSVC_STL_UPDATE. #3073 #3147
VS 2022 17.4
- Merged C++23 features:
- P0849R8 #2808
auto(x):decay-copyIn The Language- The compiler part is not yet implemented; the library part was implemented in C++20 mode when Ranges were initially implemented.
- P0881R7 #2502
<stacktrace>- P2301R1 Add A
pmrAlias Forstd::stacktrace
- P2301R1 Add A
- P1206R7 #2806 #3026 #3028 Conversions From Ranges To Containers
- P1328R1 #2793
constexprtype_info::operator==() - P1899R3 #2981
views::stride - P2291R3 #3049
constexprIntegral<charconv> - P2302R4 #2911
ranges::contains,ranges::contains_subrange - P2387R3 #2661 Pipe Support For User-Defined Range Adaptors
- P2408R5 #2960 #3056 Ranges Iterators As Inputs To Non-Ranges Algorithms
- P2417R2 #2972 More
constexprbitset - P2419R2 #2977 Clarify Handling Of Encodings In Localized Formatting Of
chronoTypes - P2438R2 #3057
string::substr() && - P2440R1 #2580
ranges::iota,ranges::shift_left,ranges::shift_right - P2441R2 #2619
views::join_with - P2445R1 #2974
forward_like() - P2446R2 #3008
views::as_rvalue - P2494R2 #2965 Relaxing Range Adaptors To Allow Move-Only Types
- P2499R0 #2947
string_viewRange Constructor Should Beexplicit - P2517R1 #2959 Conditional
noexceptForapply() - P2520R0 #2958 #2994
move_iterator<T*>Should Be A Random-Access Iterator
- P0849R8 #2808
- Merged LWG issue resolutions:
- LWG-3564 #2961
transform_view::iterator<true>::value_typeanditerator_categoryshould useconst F& - LWG-3617 #2966
function/packaged_taskdeduction guides and deducingthis - LWG-3656 #2880 Inconsistent bit operations returning a count
- LWG-3671 #2905
atomic_fetch_xormissing fromstdatomic.h - LWG-3672 #2907
common_iterator::operator->()should return by value - LWG-3683 #2879
operator==forpolymorphic_allocatorcannot deduce template argument in common cases - LWG-3701 #2957 Make
formatter<remove_cvref_t<const charT[N]>, charT>requirement explicit - LWG-3707 #2883
chunk_view::outer-iterator::value_type::sizeshould return unsigned type - LWG-3710 #2878 The
endofchunk_viewfor input ranges can beconst - LWG-3712 #2943
chunk_viewandslide_viewshould not bedefault_initializable - LWG-3715 #2946
view_interface::emptyis overconstrained - LWG-3719 #2902 Directory iterators should be usable with default sentinel
- LWG-3721 #2906 Allow an arg-id with a value of zero for width in std-format-spec
- LWG-3724 #2903
decay-copyshould be constrained
- LWG-3564 #2961
- Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
- Fixed bugs:
- Fixed linker errors when using
<any>with our unofficially supported mode to disable exceptions. #2193 - Fixed compiler errors when using
<format>with the new compiler option/presetPaddingby adding a compiler bug workaround. #2746 - Fixed division by
complexzero to behave consistently with other implementations. #2758 - Fixed a memory leak in
<syncstream>. #2763 - Fixed compiler errors when formatting
longorunsigned longvalues withformatter. #2768 - Fixed a binary compatibility break in the unordered associative containers, which could cause memory corruption when linking code that was built with different versions of the STL. #2774
- Original Versions: VS 2015 through VS 2019 16.2 inclusive.
- Modified Versions: VS 2019 16.3 through VS 2022 17.3 inclusive.
- Fixed Versions: VS 2022 17.4 and later.
- The bincompat break happened when mixing Original with Modified code. All other mixing is safe: Original with Original, Modified with Modified, Fixed with Fixed, Original with Fixed, and Modified with Fixed.
- Fixed a bug in the unordered associative containers, specific to user-defined allocators, where the containers sometimes called
deallocate()with null pointers. User-defined allocators aren't required to tolerate that, so the containers now avoid such calls. #2790 - Fixed a bug in
deque, specific to rarely-used fancy pointers, where some fancy pointers weren't being destroyed. #2775 <chrono>formatting now accepts%x("The locale's date representation") foryear_month_day,year_month_day_last,year_month_weekday, andyear_month_weekday_last. #2762std::filesystem::directory_entry's constructors,assign(), andreplace_filename()now callrefresh()as required by the Standard and will propagate any errors (via exceptions orerror_codes), except that "file not found" is not considered an error. #1343- Added a compiler bug workaround to
construct_at(), allowing immovable objects to be emplaced via copy elision. #2624 - Fixed leap second validation when parsing
time_points. #2705 lerp()now avoids overflowing to infinity when it can calculate the correct result with a fallback approach. #1918- Fixed a debugger visualization issue, specific to Clang in C++20 mode (or later), where the debugger wouldn't display the contents of a
list,forward_list, or ordered/unordered associative container. #2782 - Fixed the visualizers for the non-Standard
stdext::hash_mapcontainer family. #2784 - Fixed the visualizers for
make_shared()andallocate_shared(). #2811 put_time()(and thetime_put::do_put()machinery powering it) now avoids modifyingerrnowhen it succeeds. #2049- Added a compiler bug workaround to fix compiler errors with
source_location::current()in certain scenarios. #2824 - Fixed compiler errors when using
<format>to printdurations with extremely small periods (e.g. femtoseconds, attoseconds). #2814 - Fixed "
istreambuf_iteratoris not dereferenceable" assertions when attempting to usetime_get::get()orget_time()to parse certain formats when there's insufficient input. #2851- For example, with the format
"%X", the input"3:04:05"succeeds. The input"3:04"previously asserted/crashed; now it setsios_base::failbit | ios_base::eofbitas required by the Standard.
- For example, with the format
- ...
- Fixed linker errors when using
VS 2022 17.3
- Merged C++23 features:
- Merged partial C++23 features:
- Merged LWG issue resolutions:
- LWG-3121 #2640
tupleconstructor constraints forUTypes&&...overloads - LWG-3525 #2639
uses_allocator_construction_argsfails to handle types convertible topair - LWG-3570 #2418
basic_osyncstream::emitshould be an unformatted output function - LWG-3571 #2418
flush_emitshould setbadbitif theemitcall fails
- LWG-3121 #2640
- Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
- Fixed bugs:
- Fixed
vector<bool>to properly invalidate iterators during reallocation, which fixes compiler errors withconstexprusage ofvector<bool>. #2441 empty_viewrvalues are now consideredborrowed_ranges as required by the Standard. #2576- Added compiler bug workarounds to
is_convertibleandcommon_reference, socontiguous_iterator<const volatile int*>is nowtrue. #2592 - Added missing constraints to functions that were implied by "Effects: Equivalent to" Standardese:
make_any(),make_optional(),shared_ptr::operator=(),shared_ptr::reset(), andweak_ptr::operator=(). - Fixed
filesystem::path's comparison operators and some other member functions being IF-NDR (ill-formed, no diagnostic required) in C++23 mode. #2457 - Fixed C++20
<chrono>parsing to fail when the input is insufficient to supply the entire format string. #2523- For example, the input
"23:59"is insufficient for the format string"%H:%M:%S".
- For example, the input
- Fixed an out-of-bounds read in
ranges::find()withunreachable_sentinel. #2434 - Added compiler bug workarounds for CUDA (involving
[[nodiscard]] friend) to fix spurious cases of "warning C5240: 'nodiscard': attribute is ignored in this syntactic position". #2622 - Removed
ExecutionPolicyoverloads ofcopy_backward()andmove_backward()that were mistakenly implemented. They don't appear in the Standard because they would be useless. #2627 - Added compiler bug workarounds for Clang (involving the ordering of constrained and unconstrained destructors) to fix compiler errors in
<ranges>machinery. #2630 - Fixed a bug affecting
<future>'s use of<ppltasks.h>in Desktop XAML apps. #2654 - Fixed a bug that prevented C++20
<chrono>from parsing fractional seconds as floating-pointdurations. #2638 - Fixed
<bit>'scountl_zero()returning incorrect results on ARM64 for 8-bit and 16-bit types. #2647 - Added macroization guards to the STL's usage of compiler-specific custom attributes. #2649
- Fixed
get_time()andtime_get's 2-digit year logic. #2666 - Fixed
system_category().message()to behave correctly instead of returning"???"when the user language and system language are different. #2669 - Fixed the ARM64EC implementations of
atomic_thread_fence()andatomic<8-byte type>::store(). #2702 - Fixed compiler errors in
atomic<shared_ptr<T[]>>,atomic<shared_ptr<T[N]>>,atomic<weak_ptr<T[]>>, andatomic<weak_ptr<T[N]>>. #1339 - Added overloads of
<cmath>'slerp()for arithmetic types. #2113 - Fixed
filesystem::directory_entryto work with FAT32 and exFAT. #2373 <filesystem>now handles special system files likehiberfil.sys. #2715filesystem::copy_file()now tolerates other processes having opened the source file or the target file for reading or writing (as much as possible, depending on the choice ofcopy_options). #2718- Fixed the visualizers for
shared_ptr<void>,weak_ptr<void>, andunique_ptr<void, Deleter>. #2706 - Fixed compiler errors in
move_only_functionwhen compiling<functional>in/std:c++latestmode with/Zc:alignedNew-. #2712 - Implemented C++20's removal of the explicit specialization for
allocator<void>. #2726- Note that
allocator<void>is still supported, it just uses the primary template now.
- Note that
- Fixed "unresolved external symbol" linker errors in certain scenarios involving separately compiled third-party libraries. #2734 #2738
- On x64, these errors mentioned
__imp___std_init_once_begin_initializeand__imp___std_init_once_complete. - On x86, these errors mentioned
__imp____std_init_once_begin_initialize@16and__imp____std_init_once_complete@12. - This fixed a regression that was introduced by #2381 in VS 2022 17.2.
- This fix was backported to VS 2022 17.2.5.
- On x64, these errors mentioned
- Fixed
- Improved performance:
- Optimized
rotl()androtr()in<bit>for 8-bit and 16-bit integers by using compiler intrinsics. #2611 - Optimized the vectorized implementation of
reverse()for 32-bit trivial types. #2383 - Improved
<format>performance when the execution character set isn't self-synchronizing, by caching expensive calls to get codepage info. #2600 - Added vectorized implementations of
find(),count(),ranges::find(), andranges::count(), with speedups ranging from 2.0x to 27.6x (times, not percent). #2434 - Slightly improved the performance of
<charconv>floating-pointfrom_chars(). #2623
- Optimized
- Improved throughput:
- Used
if constexprinstead of tag dispatch, overloads, or specializations in:is_permutation(),sample(),rethrow_if_nested(), anddefault_searcher. #2219<map>and<set>'s common machinery. #2287polymorphic_allocator. #2471basic_string_viewandbasic_string'sfind_first_of(),find_last_of(),find_first_not_of(), andfind_last_not_of(). #2479 #2660<regex>. #2484- Parallel
inclusive_scan()andtransform_inclusive_scan(). #2662 scoped_allocator_adaptor'soperator==(). #2677function,move_only_function, andbind(). #2668vector<bool>::insert(). #2694
- Replaced tag dispatch with SFINAE in
subtract_with_carry_engine's internal machinery. #2693 - Split
<chrono>into a smaller internal header, improving throughput when other headers need only pre-C++20<chrono>machinery. #2604
- Used
- Enhanced behavior:
- Changed
<deque>to use scope guards instead of `thro...
- Changed
VS 2022 17.2
- Merged C++20 Defect Reports:
- Merged C++23 features:
- Merged LWG issue resolutions:
- LWG-2762 #2376
unique_ptroperator*()should benoexcept - LWG-2774 #2098
std::functionconstruction vs assignment - LWG-3146 #2409 Excessive unwrapping in
std::ref/cref - LWG-3392 #2421
ranges::distance()cannot be used on a move-only iterator with a sized sentinel - LWG-3470 #2414
convertible-to-non-slicingseems to reject valid case - LWG-3471 #2567
polymorphic_allocator::allocatedoes not satisfy Cpp17Allocator requirements - LWG-3480 #2340
directory_iteratorandrecursive_directory_iteratorare not C++20 ranges - LWG-3519 #2208 Incomplete synopses for
<random>classes - LWG-3543 #2424 Definition of when
counted_iterators refer to the same sequence isn't quite right - LWG-3557 #2406 The
static_castexpression inconvertible_tohas the wrong operand - LWG-3563 #2426
keys_viewexample is broken - LWG-3574 #2410
common_iteratorshould be completelyconstexpr-able - LWG-3580 #2417
iota_view'siterator's binaryoperator+should be improved - LWG-3589 #2425 The
constlvalue reference overload ofgetforsubrangedoes not constrainIto becopyablewhenN == 0 - LWG-3590 #2404
split_view::base() const &is overconstrained - LWG-3591 #2411
lazy_split_view<input_view>::inner-iterator::base() &&invalidates outer iterators - LWG-3592 #2411
lazy_split_viewneeds to check the simpleness ofPattern - LWG-3593 #2448 Several iterators'
base() const &andlazy_split_view::outer-iterator::value_type::end()missingnoexcept - LWG-3595 #2410 Exposition-only classes
proxyandpostfix-proxyforcommon_iteratorshould be fullyconstexpr - LWG-3598 #2560
system_category().default_error_condition(0)is underspecified - LWG-3610 #2542
iota_view::sizesometimes rejects integer-class types - LWG-3612 #2586 Inconsistent pointer alignment in
std::format - LWG-3618 #2566 Unnecessary
iter_movefortransform_view::iterator - LWG-3621 #2543 Remove feature-test macro
__cpp_lib_monadic_optional - LWG-3648 #2587
formatshould not printboolwith'c' - LWG-3654 #2528
basic_format_context::arg(size_t)should benoexcept - LWG-3657 #2564
std::hash<std::filesystem::path>is not enabled - LWG-3660 #2549
iterator_traits<common_iterator>::pointershould conform to[iterator.traits] - LWG-3661 #2544
constinit atomic<shared_ptr<T>> a(nullptr);should work
- LWG-2762 #2376
- Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
- Fixed bugs:
- Fixed Clang compiler errors when using
ranges::join_view. #2352 - Fixed several runtime correctness bugs in
std::string. #2305 - Fixed a memory leak affecting a specific scenario in P0408R7 Efficient Access To
basic_stringbuf's Buffer. #2361 - Each call to
ranges::clampnow correctly performs at most three projections. #1898 - The STL no longer rejects Clang in CUDA mode, nor the
cl /showIncludes /D__CUDACC__ ...command used by CUDA's msbuild integration to gather dependencies. #2075 - Fixed
allocator::is_always_equalto be deprecated, not removed, in C++20 mode. (It was deprecated by LWG-3170.) #2423 - Fixed
begin()/end()crashing for emptyvalarrays, which also affected range-based for-loops. #2435 - Fixed regression in
ranges::distance(from LWG-3392 which brokeranges::distance(some_array, s)) by speculatively implementing LWG-3664. #2522 - Fixed
basic_string::resize_and_overwrite()to no longer emit "warning C4018: signed/unsigned mismatch" when given certain user-defined function objects. #2525 - Increased
__cpp_lib_conceptsto its final value for C++20,202002L. #2559- It should have been updated in VS 2019 16.6 when P1964R2 "Replacing
booleanWithboolean-testable" was implemented by #565. The presence of that release (or any later release) can be detected by inspecting our implementation-specific macro_MSVC_STL_UPDATE. Coincidentally, the value of_MSVC_STL_UPDATEfor VS 2019 16.6 was also202002L.
- It should have been updated in VS 2019 16.6 when P1964R2 "Replacing
- Fixed numerous tiny bugs discovered by the
libcxxtest suite. #2499 - Fixed a bug in
<format>that sporadically caused incorrect output when formatting floating-point values inhexorscientificnotation with extremely large precisions. #2569 - Fixed a bug in
<charconv>from_chars()floattiebreaking that produced incorrect results. This affected decimal strings that were at the exact midpoint of consecutivefloatvalues, within a narrow range (the smallest and largest affected values were"32768.009765625"and"131071.98828125"), where the tiebreaker rule wanted to round to "even" and "even" happened to be "down", but the implementation incorrectly rounded "up". (doublewas unaffected.) #2366 promise<T>now compiles when!is_default_constructible_v<T>. #2568- Moving from an
optional<const T>now behaves like moving from aconst T: it selectsT's copy constructor. #2460 - Fixed a bug in
<format>that incorrectly acceptedvolatilearguments; the Standard currently says that they should be rejected. #2579
- Fixed Clang compiler errors when using
- Improved performance:
- Optimized
rotl()androtr()in<bit>for 32-bit and 64-bit integers by using compiler intrinsics. [#2369](https:...
- Optimized
VS 2022 17.1
- Merged C++20 Defect Reports:
- Merged C++23 features:
- P0448R4 #2029
<spanstream> - P0943R6 #2008 Supporting C Atomics In C++
- Note:
<stdatomic.h>is currently supported when compiling as C++ (/std:c++latest). It is not yet supported when compiling as C (/std:c11and/std:c17), but support for C atomics is planned for a future release. For more info, see the September 2020 blog post "C11 and C17 Standard Support Arriving in MSVC".
- Note:
- P1072R10 #2258
basic_string::resize_and_overwrite - P1147R1 #2262 Printing
volatilePointers - P1272R4 #2235
byteswap() - P1425R4 #1994 Iterator Pair Constructors For
stackAndqueue - P1518R2 #2032 Stop Overconstraining Allocators In Container Deduction Guides
- P1659R3 #1997
ranges::starts_with,ranges::ends_with - P2136R3 #2019
invoke_r() - P2251R1 #2259 Require
spanAndbasic_string_viewTo Be Trivially Copyable - P2401R0 #2263 Conditional
noexceptForexchange()
- P0448R4 #2029
- Merged LWG issue resolutions:
- P2259R1 #2059 Repairing Input Range Adaptors And
counted_iterator- Completed by implementing the input range adaptors part.
- LWG-3422 #2260 Issues of
seed_seq's constructors - LWG-3506 #1994 Missing allocator-extended constructors for
priority_queue - LWG-3520 #2200
iter_moveanditer_swapare inconsistent fortransform_view::iterator - LWG-3522 #1994 Missing requirement on
InputIteratortemplate parameter forpriority_queueconstructors - LWG-3527 #2194
uses_allocator_construction_argshandles rvalue pairs of rvalue references incorrectly - LWG-3528 #2160
make_from_tuplecan perform (the equivalent of) a C-style cast - LWG-3536 #2037 Should
chrono::from_stream()assign zero todurationfor failure? - LWG-3546 #1991
common_iterator'spostfix-proxyis not quite right - LWG-3549 #2198
view_interfaceis overspecified to derive fromview_base - LWG-3554 #2261
chrono::parseneedsconst charT*overloads
- P2259R1 #2059 Repairing Input Range Adaptors And
- Fixed bugs:
- Fixed
<complex>exp()andpolar()for infinity and NaN inputs. #1584 - Fixed compiler errors when comparing
common_iterators of different types for equality. #2066 - Attempting to actually call
declval()now emits astatic_assertciting the paragraph of the Standard that forbids this. (Previously,declval()was declared but not defined, which was too permissive.) #2101 - Fixed
basic_streambuf::seekoff()andbasic_streambuf::seekpos()to work with custompos_types. #2121 - Restored our guarantee beyond the Standard that
string_viewis trivially move constructible. #2128 - Fixed a bug where
vectorandstringwould terminate vianoexceptinstead of throwinglength_erroras desired when asize_twould be truncated to an allocator's narrowersize_type. #2139 <istream>and<ostream>now properly catch and rethrow internal IO exceptions. #2033- Fixed
<format>to correctly print hexfloats with large precisions. #2157 - Fixed compiler errors when using
constexprvectors with certain user-defined allocators. #2161 - Fixed silent bad codegen in
ranges::stable_sort(), where for certain inputs it would neither sort nor permute the range.ranges::inplace_merge()was also affected. #2188 subtract_with_carry_engine's textual representation is now correct. #2088- Fixed a deadlock in the overload of
condition_variable_any::wait_untiltakingstop_token. #2220 u8streampos,u16streampos, andu32streamposare now declared by<iosfwd>as required by the Standard after P0482R6 and P1148R0 were accepted. #2223- Fixed ARM64EC compiler errors in
<limits>. #2306 - Fixed heap corruption in
fstreamwhen callingputback()followed byclose(). #2189 - Fixed
views::reverseto work properly withranges::reverse_viewlvalues. #2313 - Fixed a bug where the STL's DLL was using Windows Vista's APIs for critical sections and condition variables, instead of the more efficient APIs that were introduced in Windows 7. This was specific to
/MD(dynamic release) and the STL's GitHub CMake build system; it did not affect the legacy build system that's currently used for official builds of the MSVC toolset. #2314 - Fixed a bug affecting older CPUs where the STL generated the newer
tzcntinstruction instead of the fallbackbsfinstruction. This affected<bit>'scountr_zero()andcountr_one(),<numeric>'sgcd()andlcm(), andvector<bool>'s optimized implementations offind()and relational/spaceship operators. #2333 - Fixed minor conformance issues in
basic_string. These changes were specified by P1148R0 "Cleaning Up[strings]", which was almost a pure rewording paper without normative impact. Oops! #2222 - Fixed
ranges::find_end()to return correct values for bidirectional common ranges. #2270 - Fixed compiler errors affecting
ranges::sort(),ranges::search(), and other ranges machinery. #2290 - Fixed
array<T, 0>, allowing it to compile whenTis not default constructible. #2296 - Fixed
allocator::allocate_at_least()which was improperly annotated with__declspec(allocator). #2328
- Fixed
- Improved performance:
- Optimized
steady_clock::now()whenQueryPerformanceFrequency()is exactly 10 MHz, which is very common for modern PCs. #2086 - Improved codegen for x86 atomic loads. #2110
- Optimized the fallback implementation of
popcount(), which is used when compiler intrinsics are unavailable (and is also used at compile time). #2079 - Slightly improved codegen when
<format>prints a pointer in hexadecimal. #2097 - Optimized
<ranges>non-propagating-cachefor trivially destructible types. #2118 - Improved ARM64 codegen for
popcount(), using compiler intrinsics. #2127 - Extended the
memcpy(), `...
- Optimized
VS 2022 17.0
- Merged C++20 Defect Reports:
- Enabled C++20 features for Clang: #2064
- Merged C++23 features:
- P0401R6 #2036 Providing Size Feedback In The Allocator Interface
- P1048R1 #1950
is_scoped_enum - P1132R7 #1998
out_ptr(),inout_ptr() - P1679R3 #1478
contains()Forbasic_string/basic_string_view - P1682R3 #1828
to_underlying()For Enumerations - P1951R1 #2009 Default Template Arguments For
pair's Forwarding Constructor - P1989R2 #2000 Range Constructor For
string_view - P2162R2 #2006 Inheriting From
variant - P2166R1 #1995 Prohibiting
basic_stringAndbasic_string_viewConstruction Fromnullptr- This is a common source-breaking change - code that previously had undefined behavior at runtime will now be rejected with compiler errors.
- P2186R2 #2010 Removing Garbage Collection Support
- Merged LWG issue resolutions:
- LWG-3430 #1968
std::fstream& co. should be constructible fromstring_view - LWG-3494 #1877 Allow ranges to be conditionally borrowed
- LWG-3502 #1878
elements_viewshould not be allowed to return dangling references - LWG-3518 #2080 Exception requirements on char trait operations unclear
- LWG-3533 #1993 Make
base() const &consistent across iterator wrappers that supportinput_iterators - LWG-3541 #1992
indirectly_readable_traitsshould be SFINAE-friendly for all types - LWG-3548 #2007
shared_ptrconstruction fromunique_ptrshould move (not copy) the deleter - LWG-3553 #1990 Useless constraint in
split_view::outer-iterator::value_type::begin() - LWG-3555 #1989
{transform,elements}_view::iterator::iterator_conceptshould considerconst-qualification of the underlying range
- LWG-3430 #1968
- Merged partial LWG issue resolutions:
- Fixed bugs:
- Fixed
time_put::do_putto avoid crashing when the invalid parameter handler has been changed to not end execution. #1563 - Fixed a compiler error in
ranges::take_view. #1844 - Fixed improper partitioning of forward ranges in the parallel algorithms. #1753
- Fixed an unintentionally dllexported symbol in the import library. #1927
- Fixed a bug in which
ranges::unique_copywould fail to compile with a non-input output iterator. #1933 - Fixed a compiler error when calling
format_to()in a specialization offormatter(see #1961 for an example). #1874 - Fixed compiler errors when calling
views::dropandviews::takewith types that aren't integers, but are convertible to integers (e.g.integral_constant). #1958 - Fixed a compiler error when calling
constexprvector::emplace(position, args...). #1962 - Fixed
jthreadto providenative_handle(). #1966 - Fixed
filesystem::remove()to delete read-only files, as required by the Standard. #1559 - Fixed
mersenne_twister_engine: #1631- Fixed the seeding algorithm to follow N4892 [rand.eng.mers]/8, avoiding an all-zero state. (This is a runtime special case.)
- Fixed the engine's behavior when
m == norn == 1. (This is a compile-time special case, which doesn't affectmt19937andmt19937_64at all.) - Fixed
operator<<()to avoid printing a trailing space after the engine's textual representation.
- Fixed
<chrono>to adjust for leap seconds when formattingfile_time. #1879 - Fixed
chrono::from_stream()to allow a year and a day-of-year to be parsed to atime_point. #1940 - Fixed
filesystem::u8path()to acceptchar8_tsources. #1943 - Fixed
<chrono>to parse subseconds fortime_points. #1987- Also fixed the parsing of
local_timewith a UTC offset.
- Also fixed the parsing of
- Fixed
<chrono>formatting to correctly estimate string widths (see N4892 [format.string.std]/9). #2017 - Fixed a major regression in the
_ITERATOR_DEBUG_LEVEL == 2machinery, where a multithreaded program in debug mode could crash when one thread is modifying a container and another thread is destroying iterators. #2060- This regression affected all Standard modes (C++14/17/20/23) and was introduced by #1546 in VS 2019 16.10.
- Fixed in both VS 2019 16.11.4 and VS 2022 17.0.
- Fixed a compiler error in
pmr::map<K, pair<A, B>>::operator[]. #2023 - Fixed compiler errors in
basic_string'sgetline()andoperator>>()caused by the source-breaking change C++23 P2266R1 "Simpler Implicit Move", first implemented in Clang 13. #2025 bit_ceil()now enforces its precondition duringconstexprevaluation, as required by the Standard. #2041clogis no longer tied tocout, and similarly forwclogandwcout, following the Standard. #2056- In
<ranges>, whenfilter_view,drop_view,drop_while_view, andreverse_viewstore a cached position into an underlying view, they now properly invalidate that cached position when the underlying view is moved from. #1931
- Fixed
- Improved performance:
- Slightly improved debug codegen for
vector<bool>,basic_string, andmap/multimap/set/multiset'sempty()member functions. #1836 - Fixed bloated codegen for
<format>. #1874 - Dramatically improved the performance of
std::find()andstd::count()forvector<bool>, with measured speedups between 19x and 26x (times, not percent). #1131 - Extended our
memcmp/memcpy/memchroptimizations to ranges with contiguous iterators and unreachable sentinels. #1810 <format>now detects when it's writing to aback_insert_iteratorfor abasic_stringor avector, and performs a faster call toinsert()at theend()of the container. #1894std::bytenow activates the "trivially swappable" optimization inreverse()andvariant::swap(), so it'll have the same performance asunsigned char. #2044- Extended the vectorization optimization in
std::swap_ranges()toranges::swap_ranges(), and enhanced it to work for arbitrary contiguous iterators. #2048 - Reduced debug codegen size; an internal assertion macro was emitting completely unused, potentially long strings for function names. #2054
- Slightly improved debug codegen for
- Improved throughput:
<format>and<chrono>now avoid including `<arr...
VS 2019 16.9
- Merged C++20 features:
- P0339R6 #1311
polymorphic_allocator<> - P0660R10 #1196
<stop_token>Andjthread - P0768R1 #1370 Library Support For The Spaceship Comparison Operator
<=>- This feature was mostly implemented in VS 2019 16.0; it's now complete with the addition of the spaceship customization point objects
strong_order,weak_order,partial_order,compare_strong_order_fallback,compare_weak_order_fallback, andcompare_partial_order_fallback.
- This feature was mostly implemented in VS 2019 16.0; it's now complete with the addition of the spaceship customization point objects
- P1007R3 #1306
assume_aligned() - P1020R1 #1315 Smart Pointer Creation With Default Initialization
- P1771R1 #1495 #1514
[[nodiscard]]For Constructors
- P0339R6 #1311
- Merged partial C++20 features:
- P0355R7
<chrono>Calendars And Time Zones:- #1341
operator<<(basic_ostream&, const duration&)
- #1341
- P0896R4 Ranges:
- #1092 #1265 #1268
common_iterator - #1271
views::takeandviews::dropnow handlebasic_string_viewas specified in P1739R4. - #1313
ranges::construct_atandranges::destroy_at - #1164 algorithms
ranges::uninitialized_default_construct,ranges::uninitialized_default_construct_n,ranges::uninitialized_value_construct,ranges::uninitialized_value_construct_n,ranges::uninitialized_fill,ranges::uninitialized_fill_n,ranges::uninitialized_copy,ranges::uninitialized_copy_n,ranges::uninitialized_move_n - #1281 Changes to the stream iterators (
istream_iterator,ostream_iterator,istreambuf_iterator, andostreambuf_iterator) to model the C++20 iterator concepts - #1366 view
ranges::drop_while_view - #1406 view
ranges::elements_view - #1334 view
ranges::istream_view - #1372 view
ranges::take_while_view - #1305
views::common - #1375
views::counted
- #1092 #1265 #1268
- P1502R1 Standard Library Header Units:
- P0355R7
- Merged LWG issue resolutions:
- LWG-3036 #1455
polymorphic_allocator::destroyis extraneous - LWG-3117 #1493 Missing
packaged_taskdeduction guides - LWG-3170 #1501
is_always_equaladded tostd::allocatormakes the standard library treat derived types as always equal - LWG-3211 #1460
std::tuple<>should be trivially constructible - LWG-3448 #1458
transform_view'ssentinel<false>not comparable withiterator<true> - LWG-3460 #1452 Unimplementable
noop_coroutine_handleguarantees - LWG-3464 #1483
istream::gcount()can overflow
- LWG-3036 #1455
- Fixed bugs:
- Fixed the
invocable_rfamily of type traits to handle C++17 deferred temporary materialization. #1282 - Fixed a compiler error in
atomic_ref<[u]int8_t>::operator--(int). #1303 - Removed non-Standard implicitly converting constructors from
complex. #1294 - Enabled
constexprdestruction ofmemory_resource. #1314 std::filesystem::create_directories()now throws an exception (or fails with anerror_code) when called with an emptypath. #1285- Fixed compiler errors (with clang-tidy and IntelliSense-in-Clang-mode) caused by
intrin0.hincludingintrin.h, which no longer happens. #1300 - Fixed undefined behavior and incorrect results in
geometric_distribution,poisson_distribution,binomial_distribution, andgamma_distribution. #1159 - Fixed incorrect results (infinity and NaN) in
normal_distribution,lognormal_distribution,fisher_f_distribution, andstudent_t_distribution. #1228 - Fixed
bind_front()to determine its return type from the decayed types of its arguments. #1293 - Fixed
pow(complex, arithmetic)to strictly follow the Standard's rules and return correct results. #1299 - Fixed
_Node_handle- the internal class template that reifies the Standard'snode-handlefamily of exposition-only types - to destroy contained values with an allocator rebound to the value type instead of to the type of the node. #1310 - Fixed overflow when converting extreme relative times (like
duration::max()) to absolute times incondition_variable_any::wait_for(),condition_variable::wait_for(),recursive_timed_mutex::try_lock_for(),shared_timed_mutex::try_lock_for(),shared_timed_mutex::try_lock_shared_for(),this_thread::sleep_for(), andtimed_mutex::try_lock_for(). #1371 - Fixed a compiler error when compiling
<experimental/generator>in/kernelmode. #1373 - Fixed
std::atomic_init; C++20 deprecated it (which we previously implemented) and changed its effects to be equivalent to a relaxed store (which we previously missed). #1090 - Fixed
get_time()to correctly handle format specifications without delimiters; for example,"20201029"can now be parsed with"%Y%m%d". #1280- This fix was incomplete; it was completed by #1620 in VS 2019 16.10.
- Fixed the ordered associative containers (
map,multimap,set,multiset) so that their move constructors and move assignment operators don't attempt to swap their comparators (which could fail to compile, especially for lambdas which aren't assignable). #1357 - Fixed a crash when a user-defined class, deriving from
streambuf, threw an exception from its constructor. #1358 - Fixed two lines in ranges machinery that mistakenly said
noexcept(noexcept(is_nothrow_v))(which is alwaysnoexcept(true)). Now they saynoexcept(is_nothrow_v)as intended. #1417 - Marked
hash<coroutine_handle<>>::operator()asconst, required by the Standard. #1423 - Fixed several issues in
complexsqrt()andlog(): #935- Fixed
sqrt()overflow for huge inputs. - Fixed
sqrt()inaccuracy for tiny inputs, due to internal underflow. - Fixed
log()inaccuracy for tiny inputs, due to internal underflow. - Improved accuracy of
log()when |z| ~= 1. - Fixed
log(complex<float>{1, 0})for certain combinations of compile-time and run-time settings; now it correctly returns0. - These correctness fixes have a moderate performance cost, partially mitigated by using hardware FMA when available on x86/x64/arm64.
- Fixed
- Fixed an AddressSanitizer
new-delete-type-mismatchissue invalarray. #1496 - Fixed linker errors on ARM and ARM64 when using atomic waits. #1507
- Fixed the exception specification for
basic_string_view's (iterator, sentinel) constructor. #1510 - Fixed
regex_traits::transform()to accept arbitrary forward iterators instead of requiring raw pointers. #1494 - Fixed a
static_assertthat was preventingatomic_ref<const T>from compiling. #1500 - Fixed a compiler error when compiling
<atomic>in C++20 mode with Clang targeting ARM64. #1509
- Fixed the
- Improved performance:
- Removed unused code for Windows XP (and Server 2003) support, slightly improving runtime performance and decreasing...
VS 2019 16.8
- Merged C++20 features:
- P0019R8 #843
atomic_ref - P0528R3 #1029 Atomic Compare-And-Exchange With Padding Bits (for MSVC; Clang support is pending compiler intrinsics, see LLVM-46685)
- Completed P0553R4 and P0556R3 #795 by adding MSVC support for the functions in
<bit>that were previously only supported when compiling with Clang (bit_ceil,bit_floor,bit_width,countl_one,countl_zero,countr_one,countr_zero,has_single_bit,popcount,rotl, androtr). - Completed P0811R3 #1048
midpoint(),lerp()by addingconstexprsupport and improving handling of infinite arguments. - P0912R5 #894 #961 #1204 Library Support For Coroutines
- P1001R2 #1111
execution::unseq - P1032R1 #491 #861 Miscellaneous
constexpr - P1065R2 #703
constexprINVOKE - Completed P1135R6 The C++20 Synchronization Library:
- P0019R8 #843
- Merged partial C++20 features:
- P0896R4 Ranges:
- #888 algorithm
ranges::move - #892 algorithm
ranges::is_permutation - #896 algorithm
ranges::search - #904 algorithms
ranges::fillandranges::fill_n - #905 algorithms
ranges::generateandranges::generate_n - #914 algorithm
ranges::search_n - #915 algorithms
ranges::is_sortedandranges::is_sorted_until - #916 algorithms
ranges::min,ranges::max,ranges::minmax,ranges::clamp,ranges::min_element,ranges::max_element, andranges::minmax_element - #917 algorithms
ranges::lower_bound,ranges::upper_bound,ranges::equal_range, andranges::binary_search - #918 algorithm
ranges::swap_ranges - #925 concepts
std::permutableandstd::sortable - #930 algorithms
ranges::is_heap,ranges::is_heap_until,ranges::make_heap,ranges::push_heap,ranges::pop_heap, andranges::sort_heap - #941 algorithm
ranges::transform - #976 algorithms
ranges::is_partitioned,ranges::partition,ranges::partition_copy, andranges::partition_point - #983 algorithms
ranges::replace,ranges::replace_copy, andranges::replace_copy_if - #984 algorithm
ranges::replace_if - #1005 algorithms
ranges::remove,ranges::remove_if,ranges::remove_copy, andranges::remove_copy_if - #1026 algorithm
ranges::copy_backward - #1028 algorithm
ranges::reverse(vectorized likestd::reverse) - #1039 algorithms
ranges::uniqueandranges::unique_copy - #1044 Concept
mergeable, and algorithmsranges::includes,ranges::set_difference,ranges::set_intersection,ranges::set_symmetric_difference, andranges::set_union - #1052 algorithms
ranges::sampleandranges::shuffle - #1053 algorithm
ranges::move_backward - #1063 algorithm
ranges::nth_element - #1073 algorithms
ranges::rotateandranges::rotate_copy - #1076 range access function
ranges::ssize - #1081 algorithm
ranges::lexicographical_compare - #1083 iterator adaptor
counted_iterator - #1095 algorithm
ranges::reverse_copy(vectorized likestd::reverse_copy) - #1099 algorithms
ranges::next_permutationandranges::prev_permutation - #1101 algorithm
ranges::merge - #1127 algorithm
ranges::sort - #1132 view
ranges::ref_view - #1137 algorithm
ranges::uninitialized_move - #1201 range factories
views::emptyandviews::single - #1229 range adaptors
views::allandviews::reverse - #1231 algorithms
ranges::partial_sortandranges::partial_sort_copy - #1245 P1391R4 Range Constructor For
string_view - #1252 range adaptor
views::filter - #1253 range adaptors
views::dropandviews::take - #1258 range adaptor
views::transform
- #888 algorithm
- P0896R4 Ranges:
- Merged LWG issue resolutions:
- Fixed bugs:
variantno longer emits warnings about narrowing/sign conversions when determining which alternative should be activated for a given initializer. (Warnings can still be emitted by the chosen initialization; that's intentional and desirable.) #858condition_variable_anynow correctly unlocks-and-relocks the lock argument to timed wait functions when given a non-positive relative timeout or absolute time in the past. #685std::powis now templated to handle integral and floating-point types as required by C++11 and later. For example,std::pow(float, int)previously returnedfloatand now returnsdouble. #903- Removed a bogus overload of
ranges::copy_nthat wasn't supposed to exist and wouldn't have compiled. #957 filesystem_errornow transcodes wide characters with no equivalent in the current locale to replacement characters instead of failing and throwingsystem error. #1010- Fixed
0 <=> partial_ordering::unorderedto return the correct value, and improved<compare>codegen. #1049 discrete_distributionno longer yields invalid results when its parameters sum very close to, but not equal to 1. #1025move_iterator::currentis no longer inadvertently aprotecteddata member - it has become properlyprivateand been renamed. #1080- Range algorithms no longer mishandle pointer-to-member predicates and projections when they are larger than
void*. #1091 - The
slice_array,gslice_array,mask_array, andindirect_arrayhelpers defined in<valarray>now have proper copy constructors and copy assignment operators. #988 - Fixed a bug in
ranges::iter_swapthat would cause it to sometimes drop one of the "swapped" values on the floor. #1072 weak_ptrconversions now preserve control blocks for expired objects. #1104- Fixed
<bit>'scountl_zeroto correctly use thebsrinstruction as a fallback for old CPUs ...
VS 2019 16.7
- Merged C++20 features:
- P0415R1 #367
constexprFor<complex>(Again) - P0476R2 #583
<bit>bit_cast - P0586R2 #621 Integer Comparison Functions
- P0674R1 #309
make_shared()For Arrays - P0718R2 #601
atomic<shared_ptr<T>>,atomic<weak_ptr<T>> - P0722R3 #692 Efficient Sized
deleteFor Variable Sized Classes (library support types) - P1023R0 #599
constexprForstd::arrayComparisons - P1115R3 #566
erase()/erase_if()Returnsize_type - P1831R1 #634 Deprecating
volatileIn The Standard Library - P1871R1 #607
disable_sized_sentinel_for; renamesdisable_sized_sentineltodisable_sized_sentinel_for. - P1956R1 #524
<bit>has_single_bit(),bit_ceil(),bit_floor(),bit_width() - P1976R2 #500 Explicit Constructors For Fixed-Extent
spanFrom Dynamic-Extent Ranges - P2116R0 #587 Removing
tuple-Like Protocol Support From Fixed-Extentspan
- P0415R1 #367
- Merged partial C++20 features:
- P0768R1 #515 Library Support For The Spaceship Comparison Operator
<=>; includeslexicographical_compare_three_way. - P0784R7 #501 Library Support For More
constexprContainers; includesconstruct_at. - P0896R4 Ranges:
- #385 function objects
ranges::equal_to,ranges::not_equal_to,ranges::less,ranges::less_equal,ranges::greater, andranges::greater_equal - #734
ranges::subrangeandranges::view_interface - #759 changes to
reverse_iteratorto better adapt C++20 iterators - #787 similar changes to
move_iterator, implementmove_sentinel - #815 algorithm
ranges::find_end - #821 algorithm
ranges::find_first_of - #822 algorithm
ranges::adjacent_find
- #385 function objects
- P1135R6 The C++20 Synchronization Library; includes
atomic_flag::testand lock-free integral types. #684 - P1614R2 #385 Adding Spaceship
<=>To The Library; includes conceptsthree_way_comparableandthree_way_comparable_with, type traitcompare_three_way_result(with_tvariant), and function objectcompare_three_way.
- P0768R1 #515 Library Support For The Spaceship Comparison Operator
- Merged LWG issue resolutions:
- LWG-3149 #635
DefaultConstructibleshould require default initialization - LWG-3255 #506
span'sarrayconstructor is too strict - LWG-3320 #548
span::cbegin/cendmethods produce different results thanstd::[ranges::]cbegin/cend - LWG-3329 #512
totally_ordered_withboth directly and indirectly requirescommon_reference_with - LWG-3330 #513 Include
<compare>from most library headers - LWG-3390 #567
make_move_iterator()cannot be used to construct amove_iteratorfor a move-only iterator
- LWG-3149 #635
- Merged proposed resolutions for LWG issues that were eventually accepted at the November 2020 virtual plenary meeting:
- Fixed bugs:
operator/andoperator%forchrono::durationnow properly SFINAE away whencommon_type_t<Rep1, Rep2>can't be formed. #573<filesystem>directory_iteratornow properly handles"."and".."on network drives. #494<filesystem>space()no longer requires read permissions for every directory along the path in some cases, and resolves symbolic links. #552<filesystem>now considersERROR_BAD_NETPATHas a "file does not exist" condition. #616filesystem::path::path(const Source&)is now properly removed from overload resolution whenSourceis a non-iterator with membervalue_typeeven in C++20 mode. #631- The CMake release build now correctly uses the compiler flags in
VCLIBS_RELEASE_OPTIONS. #608 - Enabled the implementation of LWG-2899 in
/clrmode now that the fix for the compiler bug triggered by such (VSO-1006185) has been released. #417 - Fixed a bug specific to Clang 10 in
<system_error>and removed the_SILENCE_CLANG_CONCEPTS_MESSAGEbarrier in<concepts>now that we've worked with Clang developers to ensure Clang 10 and the STL play well together with Concepts enabled. #622 __cpp_lib_int_pow2is no longer incorrectly defined when the compiler lacks support for the intrinsics necessary to implementhas_single_bit,bit_ceil,bit_floor, andbit_width. Also,__cpp_lib_bitopsis no longer defined when the compiler is EDG-imitating-MSVC, so IntelliSense properly reflects the non-availability of operations not yet supported by MSVC. #695- Fixed a 43-year-old bug in
boyer_moore_searcherby implementing a 40-year-old fix. #724 std::functionnow handles over-aligned types. #698<cvt/sjis_0208>now correctly recognizes bad second bytes. #755- Fixed several bugs in
complex's Sufficient Additional Overloads. #791arg(real)now behaves likearg(complex), instead of always returning0.conj(real)now behaves likeconj(complex), returning an imaginary part of negative zero.proj(real)now behaves likeproj(complex), mapping negative infinity to positive infinity.conjandprojnow returncomplex.normnow upgrades integers todoublebefore squaring, instead of after.
<filesystem>now consistently handles nonexistent network paths when the Windows API emitsERROR_INVALID_NAME. #800- Fixed a race condition in the parallel
adjacent_findalgorithm that could cause it to return a result other than the first under heavy load. #816
- Enhanced behavior:
- Strengthened
noexceptforarrayiterators, also improving the behavior ofspanconstruction fromarrayiterators. #627 - Removed a
static_assertin<atomic>that prevented certain (completely conforming) usage from compiling until users defined the macro_ENABLE_ATOMIC_ALIGNMENT_FIX. Note: MSVC's STL has generated correct code for such usage since VS 2015 Update 2, so this change doesn't degrade correctness in any way - it merely removes an annoying compilation roadblock that warned about potential ODR violations when mixing code compiled with ancient toolsets that generated incorrect code for such usage in the first place. #723 - Enabled
bit_castfor IntelliSense now that front-end support is available. #733 complex'sreal(T)andimag(T)setters now properly returnvoid. #367- Fixed Clang warnings in STL headers (when they aren't suppressed by Clang's treatment of "system headers") and enhanced test coverage to remain clean. #755
- We now detect compiler support for
constevalby testing__cpp_consteval. [#765](https://github.c...
- Strengthened
VS 2019 16.6
- Merged C++20 features:
- P0122R7 #142 #474
<span>- P1024R3 Enhancing
spanUsability - P1085R2 Removing
spanComparisons - P1227R2 Unsigned
span::size() - P1394R4 Range Constructor For
span - P1872R0
spanShould Havesize_type, Notindex_type - LWG-3101
span'sContainerconstructors need another constraint - LWG-3102 Clarify
spaniteratorandconst_iteratorbehavior - LWG-3103 Errors in taking subview of
spanshould be ill-formed where possible - LWG-3144
spandoes not have aconst_pointertypedef - LWG-3198 Bad constraint on
std::span::span() - LWG-3274 Missing feature test macro for
<span> - LWG-3369
span's deduction-guide for built-in arrays doesn't work
- P1024R3 Enhancing
- P0202R3 #425
constexprFor<algorithm>Andexchange()- LWG-3256 Feature testing macro for
constexpralgorithms
- LWG-3256 Feature testing macro for
- P0357R3 #393 Supporting Incomplete Types In
reference_wrapper - P0619R4 #380 Removing C++17-Deprecated Features In C++20
- P0879R0 #425
constexprFor Swapping Functions - P0883R2 #390 Fixing Atomic Initialization
- P0935R0 #415 Eradicating Unnecessarily Explicit Default Constructors
- P1006R1 #397
constexprForpointer_traits<T*>::pointer_to() - P1165R1 #467 Consistently Propagating Stateful Allocators In
basic_string'soperator+() - P1423R3 #470
char8_tBackward Compatibility Remediation - P1645R1 #399
constexprFor<numeric>Algorithms - P1964R2 #565 Replacing
booleanWithboolean-testable - P2091R0 #565 Fixing Issues With Range Access CPOs
- P2102R0 #565 Making "Implicit Expression Variations" More Explicit
- P0122R7 #142 #474
- Merged partial C++20 features:
- P0768R1 Library Support For The Spaceship Comparison Operator
<=>- #402 Deprecated
std::rel_ops.
- #402 Deprecated
- P0896R4 Ranges:
- #389 some Ranges concepts, including P1456R1 Move-Only Views and P1870R1
safe_range. - #432 P2091R0 Issues With Range Access CPOs.
- #565 algorithms
ranges::all_of,ranges::any_of,ranges::copy,ranges::copy_if,ranges::copy_n,ranges::count,ranges::count_if,ranges::equal,ranges::find,ranges::find_if,ranges::find_if_not,ranges::for_each,ranges::for_each_n,ranges::mismatch, andranges::none_of. - #589 changes to
std::back_insert_iterator,std::front_insert_iterator, andstd::insert_iteratornecessary to model the Ranges iterator concepts.
- #389 some Ranges concepts, including P1456R1 Move-Only Views and P1870R1
- P0768R1 Library Support For The Spaceship Comparison Operator
- Merged LWG issue resolutions:
- Added test suites (not yet running):
- Fixed bugs:
complexacos(),acosh(), andasinh()now return correct results. #401complexpow()is now overloaded correctly. #383- Fixed
std::filesystem::remove()on ReFS. #407 - Avoided using
iter[idx]in all algorithms, because it's problematic with some unusual but Standard-conforming iterators. #464 <system_error>now mapsERROR_BROKEN_PIPEtoerrc::broken_pipe. #406- Fixed a compiler error when compiling with the Intel C++ Compiler, because it hadn't implemented C++20 conditional
explicitin C++14/17 mode. #424- Note: The Intel C++ Compiler remains unsupported by MSVC.
- Fixed the visualizers for
atomicandatomic_flag. #315
- Improved performance:
- Improved throughput:
- Significantly improved compile times for
<iterator>and<array>. Note that this is a source-breaking change for user code that expected STL headers to include other headers in certain ways. #355
- Significantly improved compile times for
- Code cleanups:
src/syserror.cppnow uses range-for andstatic_cast. #481- Changed macro constants to
constexprvariables. #487 - Cleaned up the implementation of
sort(). #449 - Added
static_assertis_sorted()for lookup tables. #451 - Removed compiler workarounds. #410 #452 #453 #454
- Added compiler workarounds. #475
- Updated the STL's required compiler to MSVC 19.25. #430
- Enabled clang-format for slightly more code. #458
- Infrastructure improvements:
- Updated
_MSVC_STL_UPDATE. #429 #486