15.7 was our first feature complete C++17 library (except floating-point <charconv>), and in 15.8 we have addressed large numbers of outstanding bugs. As usual, we’ve maintained a detailed list of the that are available. Visual Studio 15.8 is available at https://visualstudio.microsoft.com/vs/.

Correctness Fixes
  • Implemented Library Issues 2510, 2729, and 2958 for pair and tuple, constraining their assignment operators. This implementation contained a minor regression affecting assignments to std::pair from a type that implicitly converts to std::pair. We’ve fixed that regression for VS 2019 16.0 and are planning to backport the fix to VS 2017 15.9. In the meantime, if you encounter that compiler error, explicitly converting to std::pair is a workaround.
  • Because user iterators can now officially participate in the iterator debugging system, the _SCL_SECURE_NO_WARNINGS family of warnings has been removed. The previously-pseudo-documented struct _Is_checked_helper remains present in order to avoid breaking user specializations, but it is no longer used by the library directly.
  • Changed num_get overloads to store default values in the event of a failed parse, as the standard requires.
  • Fixed incorrect values numeric_limits<integral>::is_modulo and numeric_limits<floating-point>::tinyness_before.
  • Rewrote several streambuf operations to resolve cases where the streambuf would become confused; for example, cases where seekg(0) would not reset the streambuf position even when the current offset was nonzero.
  • Fixed cases where basic_filebuf would become confused when set to some multibyte locales; the lead byte table was populated using the “fake POSIX support” locale function _ismbslead, but then used the standard locale function _isleadbyte later in processing, corrupting the state of the basic_filebuf.
  • Fixed conditions where one could form a corrupted basic_stringbuf (or stringstream) by forcing it to attempt to represent a string of more than INT_MAX characters. The INT_MAX size restriction unfortunately must remain due to ABI compatibility, but at least we now consistently enforce that restriction.
  • Overhauled std::ws to Do What The Standard Says.
  • The off-by-default warning C4365 “conversion from ‘type_1’ to ‘type_2’, signed/unsigned mismatch” is now supported by the STL.
  • Fixed a case C4365 found in put_money where a narrowed wchar_t was emitted instead of the proper raw wchar_t.
  • Fixed creating an istreambuf_iterator::proxy returning the value stored in the proxy rather than returning the value one would expect from a copied istreambuf_iterator.
  • Fixed a case where linear_congruential_engine would use unsigned int to do intermediate calculations even when unsigned int could not properly store the intermediate values.
  • Fixed linear_congruential_engine::seed() to Do What The Standard Says.
  • Changed parallel algorithms’ partitioning behavior to not special case the foreground thread, improving performance in situations where the system threadpool detects an I/O bound workload and decides to oversubscribe the machine.
  • Fixed a race condition in std::async that could cause crashes or deadlocks.
  • Fixed C++17 std::filesystem‘s support .obj containing a __declspec(dllexport), causing unusual conditions like .exes with export tables.
  • Fixed recursive_directory_iterator::disable_recursion_pending() not being reset after an increment operation.
  • Fixed a long-standing bug that caused aligned_storage to treat requests for alignment greater than alignof(max_align_t) as requests for alignment equal to alignof(max_align_t). We can’t enable this fix unconditionally without breaking ABI since doing so changes layout of types with members whose type is a highly-aligned specialization of aligned_storage. As an interim solution until a future ABI-breaking release, compilation of programs that use highly-aligned aligned_storage produces a compile error explaining this issue and asking the user to define either _ENABLE_EXTENDED_ALIGNED_STORAGE to request the conforming-but-potentially-ABI-breaking behavior, or _DISABLE_EXTENDED_ALIGNED_STORAGE to request the previous incorrect-but-ABI-safe behavior.
Performance and Throughput Improvements
  • Fixed iterator wrappers like move_iterator and reverse_iterator defeating iterator debugging optimizations. These wrappers remained “checked” even after verified by algorithms. For example, fill(someVectorOfInt.rbegin(), someVectorOfInt.rend()) will properly check the range and convert to reverse_iterator<int *> instead of staying a reverse_iterator<vector::iterator> as in previous releases.
  • Changed several calls of basic_string::append(1, ch) to basic_string::push_back for micro-perf improvements in iostreams machinery.
  • Implemented a fast path for binary I/O in iostreams, quadrupling bulk I/O performance.
Other Changes
  • Removed _NOEXCEPT and other internal non-Standard macros.
  • Increased readability by consistently using nullptr in the STL’s headers.

If you have any feedback or suggestions for us, let us know. We can be reached via the comments below, via email ([email protected]) and you can provide feedback via Help > Report A Problem in the product, or via Developer Community. You can also find us on Twitter (@VisualC) and Facebook (msftvisualcpp).

Source link


Please enter your comment!
Please enter your name here