Skip to content

VS 2019 16.8

Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 09 Mar 05:20
· 1794 commits to main since this release
be0441c
  • 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 that don't support the lzcnt instruction. #1108 #1166
    • Fixed partial_sort_copy to perform only operations that are required by the Standard to compile. #1088
    • Fixed deque::erase(iter, iter) to no longer perform self-move-assignments when called with an empty range. #1148
    • Fixed coroutine_handle<>::resume and coroutine_handle<>::operator() to allow exceptions to be thrown from coroutines. #1182
    • Fixed piecewise_constant_distribution and piecewise_linear_distribution to return correctly distributed values. #1032
    • Fixed deque (and therefore queue and stack) compiler errors in unusual scenarios where iter + int and iter - int would invoke an unexpected operator overload. #1161
    • Fixed any and atomic compiler errors when building with /Zc:noexceptTypes-. #1150
    • Fixed <charconv> hexfloat from_chars() to correctly handle numbers like "0.fffffffffffff8p-1022" which are just below numeric_limits<Floating>::min(). #934
    • Changed shared_ptr's atomic functions to use SRWLOCK instead of a naive spinlock, fixing priority inversion and improving performance. #1200
    • Fixed incorrect constants that were producing incorrect results for cosh() and sinh(). #1156
    • Fixed 3 bugs in how ostream << floating_point handles precision: #1173
      • Hexfloat output now ignores precision, as required by the Standard.
      • Implemented LWG-231 (resolved in C++11, but overlooked); now, 0 precision for scientific or general notation is directly passed to sprintf, instead of being replaced with 6 precision.
      • Negative precision no longer crashes.
    • get_time() now ignores case when parsing day and month names, as required by the Standard. #1168 #1240
    • <experimental/generator> now defines an unhandled_exception() member function, required for C++20 coroutine promise types, even when /EHs isn't being used. #1219
    • Fixed compiler errors in the "iterator unwrapping" machinery for counted_iterator. #1213
    • fill now works correctly with pointers-to-volatile integral types. (This change also applies our memset/memcmp optimizations for fill/equal a bit more aggressively; they now activate for filling contiguous ranges of bool or comparing such with contiguous ranges of single-byte integer types.) #1160
    • valarray::operator[] now verifies its argument is in range when /D_CONTAINER_DEBUG_LEVEL=1. #1247
    • Fixed a compiler error in <complex> (introduced in VS 2019 16.7 by #367) when compiling with the Intel C++ Compiler's 80-bit long double mode. #1316
      • Note: 80-bit long double remains unsupported by MSVC.
  • Improved performance:
    • Extended equal()'s memcmp() optimization to ranges::equal_to and arbitrary contiguous iterators. #831
    • optional no longer unnecessarily zero-fills its storage when default constructed. #878
    • Improved span's debug codegen by simplifying its representation (as /std:c++latest isn't ABI-frozen). #877
    • Use __iso_volatile_store64 for relaxed atomics on x86, and use __iso_volatile_store64 unconditionally. #694
    • Enabled more constexpr in <system_error> using the [[msvc::noop_dtor]] attribute we requested from the MSVC compiler front-end. #1016
    • Hand-vectorized std::reverse_copy. #804
    • Refactored the comparison category types into aggregates so they can be passed in registers. #1065
    • Optimized std::fill and std::fill_n for vector<bool>. #879
    • Applied DisableThreadLibraryCalls to all "satellite" DLLs. #1142
    • Improved debug codegen in <valarray> by extracting repeated calls to size(). Also improved readability by expanding macros, and avoided unnecessary use of magic statics for non-trivial types. #1165
    • vector now avoids quadratic complexity when its size() is near max_size() (which is effectively impossible for the default allocator, making this an extremely obscure scenario). Now, if geometric growth would exceed max_size(), we clamp to max_size(). #1221
  • Enhanced behavior:
    • Strengthened noexcept for all container iterators. #1227
    • basic_string and basic_string_view now enforce the requirement that their character types must be non-array, trivial, standard-layout types. #1262
  • Improved throughput:
    • Simplified is_function, is_object, is_member_function_pointer, is_member_object_pointer, and is_member_pointer. #460
  • Improved documentation:
    • The README's IDE instructions now explain how to use the vcpkg submodule. #873
    • The README's command prompt instructions now explicitly explain how to build both x86 and x64. #1226
  • Improved test coverage:
    • Added test cases for the large integer fallback in <charconv> to_chars() plain shortest round-trip. #835
    • Future-proofed test code for the upcoming addition of C++20 std::chrono::last. #837
    • Enabled more libcxx test coverage for span. #839
    • Added test coverage for the new /Zc:preprocessor compiler option. #677
    • Added tests for LWG-3018 "shared_ptr of function type". #833
    • Fixed "unresolved" tests by linking with /MANIFEST:EMBED. #862
    • The test harness now emits a "note" for unsupported locales instead of a warning. #866
    • Prevented failing tests from displaying assertion/crash dialog boxes. Also, the standard output streams of failing tests are no longer lost due to buffering. #906
    • Increased test coverage in the ranges spaceship test by removing compiler bug workarounds. #852
    • Improved ranges test machinery. #959
    • Enabled "multiple translation unit" tests which hadn't been running in the new test infrastructure. These tests detect problems like forgetting to mark header-only non-templated functions as inline. #1109
    • Added a test to verify that deque::erase(iter, iter) no longer performs self-move-assignments when called with an empty range. #1203
    • Removed experimental /await from test configurations, and re-enabled various tests now that compiler bugs have been fixed. #1207
    • Added a test for <coroutine> "end-to-end" behavior. #1215
  • Code cleanups:
    • Updated comment to cite LWG-3446. #841
    • Renamed identifiers like _R1 to _Rx1, avoiding any resemblance to macros. #865
    • Added comments to <execution>, mentioning the subtle control flow. #849
    • Avoided function-style casts in test code. #899
    • Cleaned up stl/src, changing C casts to C++ casts, 0 to nullptr, and more. #900 #912
    • Added ranges::_Ubegin and ranges::_Uend internal helper functions to simplify getting "unwrapped" iterators from a range. #901
    • Renamed internal headers to .hpp and adjusted clang-format to sort them last. #902
    • Simplified comments, as using _Pred and using operator< weren't necessary to mention. #977
    • Removed compiler workarounds and used braces to construct objects. #978 #1020
    • Improved ranges test machinery to better tolerate using-directives. #979
    • Consistently formatted requires, preparing for when clang-format becomes aware of concepts. #999
    • Provided comparison operators for map, multimap, set, and multiset instead of their internal base class _Tree. #1022
    • Updated the implementations of some of the oldest Range algorithms to match our current style:
      • #956 ranges::copy
      • #958 ranges::copy_if
      • #970 ranges::move
      • #974 ranges::count
      • #975 ranges::count_if
      • #1058 the ranges::find family
      • #1060 the ranges::for_each family
      • #1061 the ranges::all_of family
      • #1062 ranges::swap_ranges and ranges::distance
    • Took advantage of some of the clang-format changes in LLVM 10 to keep our codebase looking nice. #1075
    • Removed unnecessary std:: qualification from product and test code. #1119
    • Cleaned up compiler bug workarounds, which will be possible to remove in the near future. #1191
    • Worked around some IntelliSense bugs in the concepts-enabled C++20 parts of the STL. #1216
    • Removed an unnecessary compiler option /d2Zi+ from CMakeLists.txt. #1218
    • Consistently use conjunction_v for short-circuiting in conditional explicit clauses. #1241
    • Avoided null pointer constants masquerading as integers by replacing 0 with nullptr in a great many places. #1250
  • Infrastructure improvements:
    • Updated dependencies.
    • CMakeLists.txt now defaults to using our vcpkg submodule, simplifying our build process. #1124
    • Removed a timing assumption from test_atomic_wait.hpp that was causing intermittent test failures.
    • Added /analyze to PR/CI builds, and fixed the resulting warnings. #1009
    • Enhanced our Code Format Validation check to detect lines exceeding 120 columns, and cleaned up a few occurrences in areas where clang-format had been suppressed. #1214
  • Updated _MSVC_STL_UPDATE. #897 #989 #1144