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 STL fixes that are available. Visual Studio 2017 15.8 is available at https://visualstudio.microsoft.com/vs/.
- Implemented Library Issues 2510, 2729, and 2958 for
tuple, constraining their assignment operators. This implementation contained a minor regression affecting assignments to
std::pairfrom 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::pairis a workaround.
- Because user iterators can now officially participate in the iterator debugging system, the
_SCL_SECURE_NO_WARNINGSfamily of warnings has been removed. The previously-pseudo-documented struct
_Is_checked_helperremains present in order to avoid breaking user specializations, but it is no longer used by the library directly.
num_getoverloads to store default values in the event of a failed parse, as the standard requires.
- Fixed incorrect values
- 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_filebufwould 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
_isleadbytelater in processing, corrupting the state of the
- Fixed conditions where one could form a corrupted
stringstream) by forcing it to attempt to represent a string of more than
INT_MAXsize restriction unfortunately must remain due to ABI compatibility, but at least we now consistently enforce that restriction.
std::wsto 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_moneywhere a narrowed
wchar_twas emitted instead of the proper raw
- Fixed creating an
istreambuf_iterator::proxyreturning the value stored in the proxy rather than returning the value one would expect from a copied
- Fixed a case where
unsigned intto do intermediate calculations even when
unsigned intcould not properly store the intermediate values.
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::asyncthat 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.
recursive_directory_iterator::disable_recursion_pending()not being reset after an increment operation.
- Fixed a long-standing bug that caused
aligned_storageto 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_storageproduces a compile error explaining this issue and asking the user to define either
_ENABLE_EXTENDED_ALIGNED_STORAGEto request the conforming-but-potentially-ABI-breaking behavior, or
_DISABLE_EXTENDED_ALIGNED_STORAGEto request the previous incorrect-but-ABI-safe behavior.
Performance and Throughput Improvements
- Fixed iterator wrappers like
reverse_iteratordefeating 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::push_backfor micro-perf improvements in iostreams machinery.
- Implemented a fast path for binary I/O in iostreams, quadrupling bulk I/O performance.
_NOEXCEPTand other internal non-Standard macros.
- Increased readability by consistently using
nullptrin 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).