Skip to content

Releases: microsoft/STL

VS 2022 17.1

09 Mar 05:24
3c2fd04
Compare
Choose a tag to compare
  • Merged C++20 Defect Reports:
  • Merged C++23 features:
  • 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_move and iter_swap are inconsistent for transform_view::iterator
    • LWG-3522 #1994 Missing requirement on InputIterator template parameter for priority_queue constructors
    • LWG-3527 #2194 uses_allocator_construction_args handles rvalue pairs of rvalue references incorrectly
    • LWG-3528 #2160 make_from_tuple can perform (the equivalent of) a C-style cast
    • LWG-3536 #2037 Should chrono::from_stream() assign zero to duration for failure?
    • LWG-3546 #1991 common_iterator's postfix-proxy is not quite right
    • LWG-3549 #2198 view_interface is overspecified to derive from view_base
    • LWG-3554 #2261 chrono::parse needs const charT* overloads
  • Fixed bugs:
    • Fixed <complex> exp() and polar() 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 a static_assert citing the paragraph of the Standard that forbids this. (Previously, declval() was declared but not defined, which was too permissive.) #2101
    • Fixed basic_streambuf::seekoff() and basic_streambuf::seekpos() to work with custom pos_types. #2121
    • Restored our guarantee beyond the Standard that string_view is trivially move constructible. #2128
      • This fixed a regression that was introduced by #2000 implementing P1989R2 Range Constructor For string_view in VS 2022 17.0.
    • Fixed a bug where vector and string would terminate via noexcept instead of throwing length_error as desired when a size_t would be truncated to an allocator's narrower size_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 constexpr vectors 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_until taking stop_token. #2220
    • u8streampos, u16streampos, and u32streampos are 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 fstream when calling putback() followed by close(). #2189
    • Fixed views::reverse to work properly with ranges::reverse_view lvalues. #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 tzcnt instruction instead of the fallback bsf instruction. This affected <bit>'s countr_zero() and countr_one(), <numeric>'s gcd() and lcm(), and vector<bool>'s optimized implementations of find() 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 when T is not default constructible. #2296
    • Fixed allocator::allocate_at_least() which was improperly annotated with __declspec(allocator). #2328
  • Improved performance:
    • Optimized steady_clock::now() when QueryPerformanceFrequency() 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-cache for trivially destructible types. #2118
    • Improved ARM64 codegen for popcount(), using compiler intrinsics. #2127
    • Extended the memcpy(), `...
Read more

VS 2022 17.0

09 Mar 05:24
a9321cf
Compare
Choose a tag to compare
  • Merged C++20 Defect Reports:
    • P2325R3 #2012 Views Should Not Be Required To Be Default Constructible
    • P2328R1 #2038 join_view Should Join All views Of ranges
    • P2367R0 #2026 Remove Misuses Of List-Initialization From Clause 24 Ranges
  • 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() For basic_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_string And basic_string_view Construction From nullptr
      • 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 from string_view
    • LWG-3494 #1877 Allow ranges to be conditionally borrowed
    • LWG-3502 #1878 elements_view should 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 support input_iterators
    • LWG-3541 #1992 indirectly_readable_traits should be SFINAE-friendly for all types
    • LWG-3548 #2007 shared_ptr construction from unique_ptr should 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_concept should consider const-qualification of the underlying range
  • Merged partial LWG issue resolutions:
    • P2259R1 #1939 Repairing Input Range Adaptors And counted_iterator
      • The counted_iterator part is implemented; the input range adaptors part is not yet implemented.
  • Fixed bugs:
    • Fixed time_put::do_put to 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_copy would fail to compile with a non-input output iterator. #1933
    • Fixed a compiler error when calling format_to() in a specialization of formatter (see #1961 for an example). #1874
    • Fixed compiler errors when calling views::drop and views::take with types that aren't integers, but are convertible to integers (e.g. integral_constant). #1958
    • Fixed a compiler error when calling constexpr vector::emplace(position, args...). #1962
    • Fixed jthread to provide native_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 == n or n == 1. (This is a compile-time special case, which doesn't affect mt19937 and mt19937_64 at all.)
      • Fixed operator<<() to avoid printing a trailing space after the engine's textual representation.
    • Fixed <chrono> to adjust for leap seconds when formatting file_time. #1879
    • Fixed chrono::from_stream() to allow a year and a day-of-year to be parsed to a time_point. #1940
    • Fixed filesystem::u8path() to accept char8_t sources. #1943
    • Fixed <chrono> to parse subseconds for time_points. #1987
      • Also fixed the parsing of local_time with a UTC offset.
    • Fixed <chrono> formatting to correctly estimate string widths (see N4892 [format.string.std]/9). #2017
    • Fixed a major regression in the _ITERATOR_DEBUG_LEVEL == 2 machinery, 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's getline() and operator>>() caused by the source-breaking change C++23 P2266R1 "Simpler Implicit Move", first implemented in Clang 13. #2025
    • bit_ceil() now enforces its precondition during constexpr evaluation, as required by the Standard. #2041
    • clog is no longer tied to cout, and similarly for wclog and wcout, following the Standard. #2056
    • In <ranges>, when filter_view, drop_view, drop_while_view, and reverse_view store a cached position into an underlying view, they now properly invalidate that cached position when the underlying view is moved from. #1931
  • Improved performance:
    • Slightly improved debug codegen for vector<bool>, basic_string, and map/multimap/set/multiset's empty() member functions. #1836
    • Fixed bloated codegen for <format>. #1874
    • Dramatically improved the performance of std::find() and std::count() for vector<bool>, with measured speedups between 19x and 26x (times, not percent). #1131
    • Extended our memcmp/memcpy/memchr optimizations to ranges with contiguous iterators and unreachable sentinels. #1810
    • <format> now detects when it's writing to a back_insert_iterator for a basic_string or a vector, and performs a faster call to insert() at the end() of the container. #1894
    • std::byte now activates the "trivially swappable" optimization in reverse() and variant::swap(), so it'll have the same performance as unsigned char. #2044
    • Extended the vectorization optimization in std::swap_ranges() to ranges::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
  • Improved throughput:
    • <format> and <chrono> now avoid including `<arr...
Read more

VS 2019 16.9

09 Mar 05:21
e604b6c
Compare
Choose a tag to compare
  • Merged C++20 features:
    • P0339R6 #1311 polymorphic_allocator<>
    • P0660R10 #1196 <stop_token> And jthread
    • 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, and compare_partial_order_fallback.
    • P1007R3 #1306 assume_aligned()
    • P1020R1 #1315 Smart Pointer Creation With Default Initialization
    • P1771R1 #1495 #1514 [[nodiscard]] For Constructors
  • Merged partial C++20 features:
    • P0355R7 <chrono> Calendars And Time Zones:
      • #1341 operator<<(basic_ostream&, const duration&)
    • P0896R4 Ranges:
      • #1092 #1265 #1268 common_iterator
      • #1271 views::take and views::drop now handle basic_string_view as specified in P1739R4.
      • #1313 ranges::construct_at and ranges::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, and ostreambuf_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
    • P1502R1 Standard Library Header Units:
      • #1388 #1396 Added test coverage. This found blocking compiler bugs that are being fixed; see #1694 for their current status.
  • Merged LWG issue resolutions:
    • LWG-3036 #1455 polymorphic_allocator::destroy is extraneous
    • LWG-3117 #1493 Missing packaged_task deduction guides
    • LWG-3170 #1501 is_always_equal added to std::allocator makes the standard library treat derived types as always equal
    • LWG-3211 #1460 std::tuple<> should be trivially constructible
    • LWG-3448 #1458 transform_view's sentinel<false> not comparable with iterator<true>
    • LWG-3460 #1452 Unimplementable noop_coroutine_handle guarantees
    • LWG-3464 #1483 istream::gcount() can overflow
  • Fixed bugs:
    • Fixed the invocable_r family 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 constexpr destruction of memory_resource. #1314
    • std::filesystem::create_directories() now throws an exception (or fails with an error_code) when called with an empty path. #1285
    • Fixed compiler errors (with clang-tidy and IntelliSense-in-Clang-mode) caused by intrin0.h including intrin.h, which no longer happens. #1300
    • Fixed undefined behavior and incorrect results in geometric_distribution, poisson_distribution, binomial_distribution, and gamma_distribution. #1159
    • Fixed incorrect results (infinity and NaN) in normal_distribution, lognormal_distribution, fisher_f_distribution, and student_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's node-handle family 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 in condition_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(), and timed_mutex::try_lock_for(). #1371
    • Fixed a compiler error when compiling <experimental/generator> in /kernel mode. #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 always noexcept(true)). Now they say noexcept(is_nothrow_v) as intended. #1417
    • Marked hash<coroutine_handle<>>::operator() as const, required by the Standard. #1423
    • Fixed several issues in complex sqrt() and log(): #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 returns 0.
      • These correctness fixes have a moderate performance cost, partially mitigated by using hardware FMA when available on x86/x64/arm64.
    • Fixed an AddressSanitizer new-delete-type-mismatch issue in valarray. #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_assert that was preventing atomic_ref<const T> from compiling. #1500
    • Fixed a compiler error when compiling <atomic> in C++20 mode with Clang targeting ARM64. #1509
  • Improved performance:
    • Removed unused code for Windows XP (and Server 2003) support, slightly improving runtime performance and decreasing...
Read more

VS 2019 16.8

09 Mar 05:20
be0441c
Compare
Choose a tag to compare
  • 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, and rotr).
    • Completed P0811R3 #1048 midpoint(), lerp() by adding constexpr support 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 constexpr INVOKE
    • Completed P1135R6 The C++20 Synchronization Library:
      • This feature adds a new satellite DLL "atomic_wait".
      • #593 #1143 #1179 std::atomic::wait
      • P1644R0 #1136 Adding wait/notify To atomic<shared_ptr<T>>, atomic<weak_ptr<T>>
      • #1057 <barrier>, <latch>, and <semaphore>
  • Merged partial C++20 features:
    • P0896R4 Ranges:
      • #888 algorithm ranges::move
      • #892 algorithm ranges::is_permutation
      • #896 algorithm ranges::search
      • #904 algorithms ranges::fill and ranges::fill_n
      • #905 algorithms ranges::generate and ranges::generate_n
      • #914 algorithm ranges::search_n
      • #915 algorithms ranges::is_sorted and ranges::is_sorted_until
      • #916 algorithms ranges::min, ranges::max, ranges::minmax, ranges::clamp, ranges::min_element, ranges::max_element, and ranges::minmax_element
      • #917 algorithms ranges::lower_bound, ranges::upper_bound, ranges::equal_range, and ranges::binary_search
      • #918 algorithm ranges::swap_ranges
      • #925 concepts std::permutable and std::sortable
      • #930 algorithms ranges::is_heap, ranges::is_heap_until, ranges::make_heap, ranges::push_heap, ranges::pop_heap, and ranges::sort_heap
      • #941 algorithm ranges::transform
      • #976 algorithms ranges::is_partitioned, ranges::partition, ranges::partition_copy, and ranges::partition_point
      • #983 algorithms ranges::replace, ranges::replace_copy, and ranges::replace_copy_if
      • #984 algorithm ranges::replace_if
      • #1005 algorithms ranges::remove, ranges::remove_if, ranges::remove_copy, and ranges::remove_copy_if
      • #1026 algorithm ranges::copy_backward
      • #1028 algorithm ranges::reverse (vectorized like std::reverse)
      • #1039 algorithms ranges::unique and ranges::unique_copy
      • #1044 Concept mergeable, and algorithms ranges::includes, ranges::set_difference, ranges::set_intersection, ranges::set_symmetric_difference, and ranges::set_union
      • #1052 algorithms ranges::sample and ranges::shuffle
      • #1053 algorithm ranges::move_backward
      • #1063 algorithm ranges::nth_element
      • #1073 algorithms ranges::rotate and ranges::rotate_copy
      • #1076 range access function ranges::ssize
      • #1081 algorithm ranges::lexicographical_compare
      • #1083 iterator adaptor counted_iterator
      • #1095 algorithm ranges::reverse_copy (vectorized like std::reverse_copy)
      • #1099 algorithms ranges::next_permutation and ranges::prev_permutation
      • #1101 algorithm ranges::merge
      • #1127 algorithm ranges::sort
      • #1132 view ranges::ref_view
      • #1137 algorithm ranges::uninitialized_move
      • #1201 range factories views::empty and views::single
      • #1229 range adaptors views::all and views::reverse
      • #1231 algorithms ranges::partial_sort and ranges::partial_sort_copy
      • #1245 P1391R4 Range Constructor For string_view
      • #1252 range adaptor views::filter
      • #1253 range adaptors views::drop and views::take
      • #1258 range adaptor views::transform
  • Merged LWG issue resolutions:
    • LWG-1203 #1225 More useful rvalue stream insertion
    • LWG-2597 #884 std::log misspecified for complex numbers
    • LWG-3070 #923 path::lexically_relative causes surprising results if a filename can also be a root-name
  • Fixed bugs:
    • variant no 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.) #858
    • condition_variable_any now correctly unlocks-and-relocks the lock argument to timed wait functions when given a non-positive relative timeout or absolute time in the past. #685
    • std::pow is now templated to handle integral and floating-point types as required by C++11 and later. For example, std::pow(float, int) previously returned float and now returns double. #903
    • Removed a bogus overload of ranges::copy_n that wasn't supposed to exist and wouldn't have compiled. #957
    • filesystem_error now transcodes wide characters with no equivalent in the current locale to replacement characters instead of failing and throwing system error. #1010
    • Fixed 0 <=> partial_ordering::unordered to return the correct value, and improved <compare> codegen. #1049
    • discrete_distribution no longer yields invalid results when its parameters sum very close to, but not equal to 1. #1025
    • move_iterator::current is no longer inadvertently a protected data member - it has become properly private and 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, and indirect_array helpers defined in <valarray> now have proper copy constructors and copy assignment operators. #988
    • Fixed a bug in ranges::iter_swap that would cause it to sometimes drop one of the "swapped" values on the floor. #1072
    • weak_ptr conversions now preserve control blocks for expired objects. #1104
    • Fixed <bit>'s countl_zero to correctly use the bsr instruction as a fallback for old CPUs ...
Read more

VS 2019 16.7

09 Mar 05:19
0e4c641
Compare
Choose a tag to compare
  • Merged C++20 features:
    • P0415R1 #367 constexpr For <complex> (Again)
    • P0476R2 #583 <bit> bit_cast
    • P0586R2 #621 Integer Comparison Functions
    • P0674R1 #309 make_shared() For Arrays
      • LWG-3005 Destruction order of arrays by make_shared/allocate_shared only recommended?
      • LWG-3007 allocate_shared should rebind allocator to cv-unqualified value_type for construction
    • P0718R2 #601 atomic<shared_ptr<T>>, atomic<weak_ptr<T>>
    • P0722R3 #692 Efficient Sized delete For Variable Sized Classes (library support types)
    • P1023R0 #599 constexpr For std::array Comparisons
    • P1115R3 #566 erase()/erase_if() Return size_type
    • P1831R1 #634 Deprecating volatile In The Standard Library
    • P1871R1 #607 disable_sized_sentinel_for; renames disable_sized_sentinel to disable_sized_sentinel_for.
    • P1956R1 #524 <bit> has_single_bit(), bit_ceil(), bit_floor(), bit_width()
    • P1976R2 #500 Explicit Constructors For Fixed-Extent span From Dynamic-Extent Ranges
    • P2116R0 #587 Removing tuple-Like Protocol Support From Fixed-Extent span
  • Merged partial C++20 features:
    • P0768R1 #515 Library Support For The Spaceship Comparison Operator <=>; includes lexicographical_compare_three_way.
    • P0784R7 #501 Library Support For More constexpr Containers; includes construct_at.
    • P0896R4 Ranges:
      • #385 function objects ranges::equal_to, ranges::not_equal_to, ranges::less, ranges::less_equal, ranges::greater, and ranges::greater_equal
      • #734 ranges::subrange and ranges::view_interface
      • #759 changes to reverse_iterator to better adapt C++20 iterators
      • #787 similar changes to move_iterator, implement move_sentinel
      • #815 algorithm ranges::find_end
      • #821 algorithm ranges::find_first_of
      • #822 algorithm ranges::adjacent_find
    • P1135R6 The C++20 Synchronization Library; includes atomic_flag::test and lock-free integral types. #684
    • P1614R2 #385 Adding Spaceship <=> To The Library; includes concepts three_way_comparable and three_way_comparable_with, type trait compare_three_way_result (with _t variant), and function object compare_three_way.
  • Merged LWG issue resolutions:
    • LWG-3149 #635 DefaultConstructible should require default initialization
    • LWG-3255 #506 span's array constructor is too strict
    • LWG-3320 #548 span::cbegin/cend methods produce different results than std::[ranges::]cbegin/cend
    • LWG-3329 #512 totally_ordered_with both directly and indirectly requires common_reference_with
    • LWG-3330 #513 Include <compare> from most library headers
    • LWG-3390 #567 make_move_iterator() cannot be used to construct a move_iterator for a move-only iterator
  • Merged proposed resolutions for LWG issues that were eventually accepted at the November 2020 virtual plenary meeting:
    • LWG-3420 #786 cpp17-iterator should check that the type looks like an iterator first
    • LWG-3446 #834 indirectly_readable_traits ambiguity for types with both value_type and element_type
  • Fixed bugs:
    • operator/ and operator% for chrono::duration now properly SFINAE away when common_type_t<Rep1, Rep2> can't be formed. #573
    • <filesystem> directory_iterator now 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 considers ERROR_BAD_NETPATH as a "file does not exist" condition. #616
    • filesystem::path::path(const Source&) is now properly removed from overload resolution when Source is a non-iterator with member value_type even 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 /clr mode 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_MESSAGE barrier 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_pow2 is no longer incorrectly defined when the compiler lacks support for the intrinsics necessary to implement has_single_bit, bit_ceil, bit_floor, and bit_width. Also, __cpp_lib_bitops is 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_searcher by implementing a 40-year-old fix. #724
    • std::function now handles over-aligned types. #698
    • <cvt/sjis_0208> now correctly recognizes bad second bytes. #755
    • Fixed several bugs in complex's Sufficient Additional Overloads. #791
      • arg(real) now behaves like arg(complex), instead of always returning 0.
      • conj(real) now behaves like conj(complex), returning an imaginary part of negative zero.
      • proj(real) now behaves like proj(complex), mapping negative infinity to positive infinity.
      • conj and proj now return complex.
      • norm now upgrades integers to double before squaring, instead of after.
    • <filesystem> now consistently handles nonexistent network paths when the Windows API emits ERROR_INVALID_NAME. #800
    • Fixed a race condition in the parallel adjacent_find algorithm that could cause it to return a result other than the first under heavy load. #816
  • Enhanced behavior:
    • Strengthened noexcept for array iterators, also improving the behavior of span construction from array iterators. #627
    • Removed a static_assert in <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_cast for IntelliSense now that front-end support is available. #733
    • complex's real(T) and imag(T) setters now properly return void. #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 consteval by testing __cpp_consteval. [#765](https://github.c...
Read more

VS 2019 16.6

09 Mar 05:17
2b2746d
Compare
Choose a tag to compare
  • Merged C++20 features:
    • P0122R7 #142 #474 <span>
      • P1024R3 Enhancing span Usability
      • P1085R2 Removing span Comparisons
      • P1227R2 Unsigned span::size()
      • P1394R4 Range Constructor For span
      • P1872R0 span Should Have size_type, Not index_type
      • LWG-3101 span's Container constructors need another constraint
      • LWG-3102 Clarify span iterator and const_iterator behavior
      • LWG-3103 Errors in taking subview of span should be ill-formed where possible
      • LWG-3144 span does not have a const_pointer typedef
      • 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
    • P0202R3 #425 constexpr For <algorithm> And exchange()
      • LWG-3256 Feature testing macro for constexpr algorithms
    • P0357R3 #393 Supporting Incomplete Types In reference_wrapper
    • P0619R4 #380 Removing C++17-Deprecated Features In C++20
    • P0879R0 #425 constexpr For Swapping Functions
    • P0883R2 #390 Fixing Atomic Initialization
    • P0935R0 #415 Eradicating Unnecessarily Explicit Default Constructors
    • P1006R1 #397 constexpr For pointer_traits<T*>::pointer_to()
    • P1165R1 #467 Consistently Propagating Stateful Allocators In basic_string's operator+()
    • P1423R3 #470 char8_t Backward Compatibility Remediation
    • P1645R1 #399 constexpr For <numeric> Algorithms
    • P1964R2 #565 Replacing boolean With boolean-testable
    • P2091R0 #565 Fixing Issues With Range Access CPOs
    • P2102R0 #565 Making "Implicit Expression Variations" More Explicit
  • Merged partial C++20 features:
    • P0768R1 Library Support For The Spaceship Comparison Operator <=>
      • #402 Deprecated std::rel_ops.
    • 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, and ranges::none_of.
      • #589 changes to std::back_insert_iterator, std::front_insert_iterator, and std::insert_iterator necessary to model the Ranges iterator concepts.
  • Merged LWG issue resolutions:
  • Added test suites (not yet running):
  • Fixed bugs:
    • complex acos(), acosh(), and asinh() now return correct results. #401
    • complex pow() 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 maps ERROR_BROKEN_PIPE to errc::broken_pipe. #406
    • Fixed a compiler error when compiling with the Intel C++ Compiler, because it hadn't implemented C++20 conditional explicit in C++14/17 mode. #424
      • Note: The Intel C++ Compiler remains unsupported by MSVC.
    • Fixed the visualizers for atomic and atomic_flag. #315
  • Improved performance:
    • Significantly improved performance of string + null terminated and null terminated + string operator+ overloads in <string>. #467
    • Reduced memory consumption of system_category().message(). #457
    • Optimized is_permutation() and operator== for unordered multi-containers. #423
  • 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
  • Code cleanups:
    • src/syserror.cpp now uses range-for and static_cast. #481
    • Changed macro constants to constexpr variables. #487
    • Cleaned up the implementation of sort(). #449
    • Added static_assert is_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:
    • Fixed errors when building the STL with Boost 1.72. #447 #428
    • Improved how the CI builds boost-math. #450
  • Updated _MSVC_STL_UPDATE. #429 #486

VS 2019 16.5

09 Mar 05:16
Compare
Choose a tag to compare
  • Hello, world!
    • Announced this repo at CppCon 2019.
    • Added initial documentation: readme, license, and roadmap.
    • Added initial CMake build scripts for Desktop-only msvcp. #5 #80 #98 #101
    • Investigated continuous integration options, like GitHub Actions or Azure Pipelines. (Chose Azure Pipelines.)
    • Automated builds running in PRs. #114
    • Investigated test harness solutions, either building our own to more closely match the internal system in a reasonable way, or using libcxx's lit. (Chose to use lit.)
    • Began auditing test case source files from the std and tr1 test suites.
    • Implemented Custom Autolinks in this repo.
  • Merged C++20 features:
  • Merged partial C++20 features:
  • Merged LWG issue resolutions:
    • LWG-2899 #193 is_(nothrow_)move_constructible and tuple, optional, and unique_ptr
    • LWG-3158 #195 tuple(allocator_arg_t, const Alloc&) should be conditionally explicit
    • LWG-3199 #353 istream >> bitset<0> fails
    • LWG-3257 #353 Missing feature testing macro update from P0858
    • LWG-3266 #353 to_chars(bool) should be deleted
  • Merged proposed resolutions for LWG issues (not yet accepted for the C++ Working Draft, but we've chosen to implement this speculatively):
    • LWG-3268 #151 memory_order::memory_order_meow broken in C++20
  • Fixed bugs:
    • Restored swap(unique_ptr&, unique_ptr&) which was mistakenly removed. #170
    • When erasing an empty range in a vector, avoided self-move-assigning all elements. #228
    • Removed a noexcept that was incorrectly applied to an allocating helper function in list. #77
    • valarray now uses argument-dependent lookup when calling sin(), cos(), pow(), sqrt(), etc. as required by the Standard. #286
    • Fixed <filesystem> linker errors for UWP developers. #356
    • Changed the return type of locale's assignment operator to const locale& as (perhaps surprisingly) required by the Standard. #324
    • Fixed regex_token_iterator to return correct results. #131
    • Non-member begin() and end() now take basic_string_view by value as required by the Standard. #119
    • Fixed list::splice() to work correctly when splicing exactly half of one list into another. #129
  • Improved performance:
    • Fixed a codegen size regression in atomic<integral> and atomic<pointer>. #227
    • Activated x64 FrameHandler4 exception handling, reducing the size of msvcp140.dll from 588 KB to 528 KB. #154
    • Reduced the stack space consumption of list and forward_list insertion. #366
    • Improved the performance of 64-bit atomic loads on x86. #87
  • Improved throughput:
    • Used if constexpr instead of tag dispatch in <any>. #173
  • Enhanced behavior:
    • Improved the error message for function<Ret (Args) noexcept>. #350
    • any now supports over-aligned types. #173
    • Improved the messages that are emitted when including newer headers in older Standard modes. #252
    • Strengthened noexcept for exchange(). #364
    • std::function now avoids using typeid(void) in our _HAS_STATIC_RTTI=0 mode, for compatibility with Clang's -fno-rtti mode. #375
    • Added an error message explaining that the <experimental/coroutine>, <experimental/generator>, and <experimental/resumable> headers aren't supported with Clang. #136
  • Code cleanups:
    • Removed unnecessary public keywords in struct inheritance. #219
    • Used iter[idx] for clarity in <algorithm>. #289 (Note that this was reverted in VS 2019 16.6 by #464.)
    • Fixed typos in comments and error messages. #96
    • Marked more virtual member functions as override. #302
    • Fused files together. #220 #374
    • Consistently used the modern int = 0 SFINAE technique. #226 #244 #328
    • Removed compiler bug workarounds. #175 #301 #372
    • Various cleanups (described in detail in the PRs, not repeated here). #168 #221 #269 #320 #373
  • Improved documentation:
    • Added a comment explaining part of invoke()'s implementation. #368
  • Infrastructure improvements:
Read more

VS 2019 16.10

09 Mar 05:22
8eca13a
Compare
Choose a tag to compare
  • The STL is C++20 feature complete.
  • Merged C++20 features:
    • P0053R7 #1564 <syncstream>
    • P0355R7 <chrono> Calendars And Time Zones:
      • #323 implemented calendars.
      • #1789 implemented new clocks, leap seconds, time zones, and parsing.
      • #1870 implemented <chrono>'s format() support (via formatter specializations) and remaining operator<<() overloads, completing this feature.
      • While the STL generally provides all features on all supported versions of Windows, leap seconds and time zones (which change over time) require OS support that was added to Windows 10. Specifically, updating the leap second database requires Windows 10 version 1809 or later, and time zones require icu.dll which is provided by Windows 10 version 1903/19H1 or later. This applies to both client and server OSes; note that Windows Server 2019 is based on Windows 10 version 1809.
    • P0408R7 #919 Efficient Access To basic_stringbuf's Buffer
    • P0466R5 #1575 Layout-Compatibility And Pointer-Interconvertibility Traits
      • Initially supported for MSVC only; will be supported for Clang after LLVM-48860 is resolved.
    • P0475R1 #1668 Guaranteed Copy Elision For Piecewise Construction
    • P0591R4 #1668 Utility Functions For Uses-Allocator Construction
      • LWG-3185 Uses-allocator construction functions missing constexpr and noexcept
      • LWG-3187 P0591R4 reverted LWG-2586 fixes to scoped_allocator_adaptor::construct()
      • LWG-3321 uninitialized_construct_using_allocator should use construct_at
    • P0608R3 #1629 Improving variant's Converting Constructor/Assignment
    • P0645R10 #1821 #1834 #1803 #1853 #1862 #1867 #1851 #1875 <format> Text Formatting
    • P0784R7 #1369 #1546 Library Support For More constexpr Containers
    • P0896R4 Ranges, completed with the final PRs:
      • #1383 algorithms inplace_merge, stable_partition, stable_sort
      • #1693 view ranges::iota_view
      • #1436 view ranges::join_view
      • #1731 view ranges::split_view
      • #1748 Define __cpp_lib_ranges and declare victory!
      • Completes support for the 23 proposals and 35 LWG issues listed in this GH issue comment.
    • P0980R1 #1502 constexpr std::string
      • Initially supported for MSVC only; will be supported for Clang after LLVM-48606 is resolved.
    • P1004R2 #1407 #1690 #1698 constexpr std::vector
      • Initially supported for MSVC only; see note for constexpr std::string.
    • P1208R6 #664 <source_location>
      • Initially supported for MSVC only; will be supported for Clang after it implements consteval (see Clang's C++20 status).
    • P1502R1 #1567 #1692 Standard Library Header Units
      • Initially supported for MSVC only; will be supported for Clang after it implements C++20 modules (see Clang's C++20 status).
    • P1614R2 #1602 #1678 Adding Spaceship <=> To The Library
  • Merged LWG issue resolutions:
    • LWG-3171 #1573 LWG-2989 breaks directory_entry stream insertion
    • LWG-3449 #1457 take_view and take_while_view's sentinel<false> not comparable with their const iterator
    • LWG-3466 #1572 Specify the requirements for promise/future/shared_future consistently
  • Fixed bugs:
    • Fixed regex character class behavior with regex::icase. #1503
    • Fixed compiler errors when calling std::equal() with user-defined contiguous iterators. #1527
    • Fixed boolalpha extraction to be case-sensitive again. #1543 #1570 (This was a regression in VS 2019 16.8 caused by #1168.)
    • Fixed a compiler error when calling std::fill() with volatile byte*. #1557
    • Fixed ranges::unique to correctly handle inputs that are already unique. #1561
    • Fixed compiler errors, specific to Clang targeting ARM64, in <atomic> and <bit>, related to compiler intrinsics. #1505
    • Fixed C++20 mode to remove old std::allocator members that were deprecated in C++17. (As usual, fine-grained and coarse-grained escape hatches are available for this removal.) #1585
    • Fixed an inaccurate approximation in binomial_distribution. #1531
    • Fixed incorrect min/max values for several <random> distributions. #1601
    • Fixed incorrect behavior in gamma_distribution::param_type::operator==. #1601
    • Fixed a regression in VS 2019 16.6 caused by #423, where __declspec(dllexport)ing a class derived from unordered_map or unordered_set would fail to compile with a static_assert. #1639
    • Fixed compiler errors in ranges::uninitialized_copy, ranges::uninitialized_copy_n, ranges::uninitialized_move, and ranges::uninitialized_move_n when attempting to use memcpy for efficiency. #1548
    • Fixed incorrect behavior in ranges::uninitialized_value_construct and ranges::uninitialized_value_construct_n when attempting to use memset for efficiency. #1700
    • Fixed year_month_day_last::day() to return a valid-but-unspecified value for !ok() dates, as required by the Standard. #1663
    • Fixed a regression in VS 2019 16.7 caused by #309, where <memory> would fail to compile with /std:c++latest /Zc:alignedNew-. #1689
    • Fixed incorrect behavior in get_time(). #1620
      • Format specifications without delimiters are now correctly handled, even when a field is all-zero. For example, "19700405T000006" can now be parsed with "%Y%m%dT%H%M%S".
      • Literal matching (outside of '%' conversion specifications) is now case-insensitive.
      • If the stream ends during literal matching, ios_base::eofbit | ios_base::failbit is now set.
      • Incomplete conversion specifications (e.g. '%' appearing as the last character of a format specification) now result in ios_base::failbit instead of literal matching.
      • The seconds field now permits 60 to handle leap seconds.
    • Fixed compiler errors in ranges::uninitialized_copy and ranges::uninitialized_move when attempting to use memcpy for efficiency. #1713
    • Fixed compiler errors where the ranges::uninitialized_meow() algorithms assumed that <algorithm> was included; now they can be called after including only <memory>. #1832
    • Fixed an off-by-default truncation warning in <complex> (warning C5219: implicit conversion from 'const int' to 'const float', possible loss of data). [#1722](https://github.com/...
Read more