Skip to content

VS 2019 16.9

Compare
Choose a tag to compare
@StephanTLavavej StephanTLavavej released this 09 Mar 05:21
· 1715 commits to main since this release
e604b6c
  • 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 the size of the STL's DLL by 3%. #1194 #1325 #1397
    • Optimized <charconv> from_chars() by simplifying how it assembles floating-point values, and by using the branchless rounding technique that was originally invented for hex precision to_chars(). #1220
    • Changed vector's move constructor to be more optimizer-friendly. #1330
    • Optimized the fill family of algorithms (including fill_n, the uninitialized_ forms, and the ranges:: forms) to use memset when setting scalars to all-bits-zero. #1273
    • Used new compiler intrinsics in <cmath>'s float and long double overloads of ceil, copysign, floor, round, and trunc. #1336
    • The range adaptor closure objects for views::filter and views::transform now properly move from their stashed function objects when possible. #1410
    • The spaceship customization point objects strong_order and weak_order now compare floating-point values without branching on the sign bit. #1475
  • Enhanced behavior:
    • Changed _Execute_once(), an internal helper function, to be compatible with XFG, an enhanced version of the Control Flow Guard feature. #1318 #1356
    • Added checks to optional::operator* and optional::operator-> that fire when called on an empty optional when _CONTAINER_DEBUG_LEVEL > 0 (which is implied by _ITERATOR_DEBUG_LEVEL != 0). #1362
    • Header improvements: #1405
      • <tuple> no longer includes <new>.
      • Changed most (but not all) C wrapper headers to be "core headers".
    • Function objects for operators (less, equal_to, greater, plus, etc., and the recently-added compare_three_way) now emit [[nodiscard]] warnings. #1474
  • Improved throughput:
    • Replaced one use of tag dispatch with if constexpr, and changed several uses of type trait structs to variable templates (which the MSVC compiler recognizes and efficiently handles). #1413
    • Added ::std:: qualification to certain names, improving throughput for extremely large tuples (noticeable with 50+ elements). #1490
  • Improved documentation:
    • Added llvm-project and the --progress option to the README's instructions for the initial submodule sync. This takes longer (a lot longer), but it simplifies the testing instructions later. #1441
  • Improved test coverage:
    • Added more <charconv> to_chars() test cases. #1278
    • Added tests for get_time() being called with a format specification that's longer than the stream's contents. #1326
    • Updated the libcxx test suite. #1090
    • Fixed the range adaptor tests to properly test const rvalues. #1393
    • Overhauled the test harness, improving its performance for both manual and CI runs. (For example, on one machine, testing time decreased from 75 minutes to 60 minutes.) #1394
    • Added /analyze:autolog- to /analyze:only test configurations; together, these compiler options run code analysis without producing an object file (/analyze:only) and without writing detailed analyzer results to an XML file (/analyze:autolog-), as we're simply looking for any warnings from code analysis. #1434
    • Skipped parts of tests/std/tests/VSO_0226079_mutex that could intermittently fail due to system_clock time adjustments on virtual machines. #1473
  • Code cleanups:
    • Removed compiler bug workarounds. #1291 #1327 #1451
    • Removed unused #include directives from stl/src files, and changed inclusions from <meow.h> to <cmeow>. #1270
    • Removed unnecessary macros and a compiler bug workaround. #1307
    • Removed unnecessary code in ranges::uninitialized_default_construct_n. #1377
    • Changed test code to consistently use unsigned int instead of unsigned. #1390
    • Moved helper structs in separately compiled code into unnamed namespaces. #1398
    • Changed test code to construct initializer_list with Standard code, instead of our internal constructor. #1400
    • Changed test code to always remove_cvref_t the argument to enable_borrowed_range (because the library doesn't allow user specializations for cv-qualified types or reference types). #1415
    • Renamed internal <ranges> machinery to _Category_base, which avoids shadowing the internal _Iterator_base used throughout the STL. #1420
    • Improved the readability of the <ranges> "expression-equivalent" machinery by extracting a constexpr "strategy" variable. #1426
    • Removed comments that were citing proposed resolutions for LWG issues, now that those issues have been officially resolved by the November 2020 virtual plenary meeting. #1456
    • Unified internal machinery for floating-point type traits. #1442
    • Fixed a comment that was mentioning a non-existent parameter. #1476
  • Infrastructure improvements:
    • Our pre-build code checks ("validate" and "clang-format") now both run even if one fails, and the tests are now skipped when the build fails. (Certainly one of our most leet contributions.) #1337
    • Accelerated CI tests by dividing them into shards across many machines. #1414
    • Updated dependencies.
      • Updated build compiler to VS 2019 16.9 Preview 1. #1290 #1399 #1451
      • Updated Python to 3.9.0. #1371
  • Updated _MSVC_STL_UPDATE. #1272 #1340 #1439