You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/what-s-new-for-visual-cpp-in-visual-studio.md
+92-1Lines changed: 92 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,98 @@ This release brings several improvements in optimization, code generation, tools
91
91
* To increase compiler throughput, C++ Standard Library headers now avoid including declarations for unnecessary compiler intrinsics.
92
92
* Slightly improved compiler diagnostics for incorrect bind() calls.
93
93
* Improved the performance of std::string/std::wstring's move constructors by more than 3x
94
-
* For a complete list of STL improvment see the [STL Fixes In VS 2017 RTM](https://blogs.msdn.microsoft.com/vcblog/2017/02/06/stl-fixes-in-vs-2017-rtm/).
94
+
* For a complete list of Standard Library improvments see the [Standard Library Fixes In VS 2017 RTM](https://blogs.msdn.microsoft.com/vcblog/2017/02/06/stl-fixes-in-vs-2017-rtm/).
95
+
96
+
#### Visual Studio 2017 version 15.3
97
+
98
+
##### C++17 features
99
+
* … Boyer-Moore search()
100
+
*[P0031R0](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0031r0.html) constexpr For <array> (Again) And <iterator>
* The Standard Library no longer depends on Magic Statics, allowing clean use in code compiled with /Zc:threadSafeInit-.
124
+
* Implemented P0602R0 "variant and optional should propagate copy/move triviality".
125
+
* The Standard Library now officially tolerates dynamic RTTI being disabled via /GR-. dynamic_pointer_cast() and rethrow_if_nested() inherently require dynamic_cast, so the Standard Library now marks them as =delete under /GR-.
126
+
* Even when dynamic RTTI has been disabled via /GR-, "static RTTI" (in the form of typeid(SomeType)) is still available and powers several Standard Library components. The Standard Library now supports disabling this too, via /D_HAS_STATIC_RTTI=0. *Note that this will disable std::any, std::function's target() and target_type(), and shared_ptr's get_deleter().*
127
+
128
+
##### Correctness Fixes
129
+
* Standard Library containers now clamp their max_size() to numeric_limits<difference_type>::max() rather than size_type's max. This ensures that the result of distance() on iterators from that container is representable in the return type of distance().
130
+
* Fixed missing specialization auto_ptr<void>.
131
+
* The meow_n() algorithms previously failed to compile if the length argument was not an integral type; they now attempt to convert non-integral lengths to the iterators' difference_type.
132
+
* normal_distribution<float> no longer emits warnings inside the Standard Library about narrowing from double to float.
133
+
* Fixed some basic_string operations which were comparing with npos instead of max_size() when checking for maximum size overflow.
134
+
* condition_variable::wait_for(lock, relative_time, predicate) would wait for the entire relative time in the event of a spurious wake. Now, it will wait for only a single interval of the relative time.
135
+
* future::get() now invalidates the future, as the standard requires.
136
+
* iterator_traits<void *> used to be a hard error because it attempted to form void&; it now cleanly becomes an empty struct to allow use of iterator_traits in "is iterator" SFINAE conditions.
137
+
* Some warnings reported by Clang -Wsystem-headers were fixed.
138
+
* Also fixed "exception specification in declaration does not match previous declaration" reported by Clang -Wmicrosoft-exception-spec.
139
+
* Also fixed mem-initializer-list ordering warnings reported by Clang and C1XX.
140
+
* The unordered containers did not swap their hashers or predicates when the containers themselves were swapped. Now they do.
141
+
* Many container swap operations are now marked noexcept (as our Standard Library never intends to throw an exception when detecting the non-propagate_on_container_swap non-equal-allocator undefined behavior condition).
142
+
* Many vector<bool> operations are now marked noexcept.
143
+
* The Standard Library will now enforce matching allocator value_types (in C++17 mode) with an opt-out escape hatch.
144
+
* Fixed some conditions where self-range-insert into basic_strings would scramble the strings' contents. (Note: self-range-insert into vectors is still prohibited by the Standard.)
145
+
* basic_string::shrink_to_fit() is no longer affected by the allocator's propagate_on_container_swap.
146
+
* std::decay now handles abominable function types (i.e. function types that are cv-qualified and/or ref-qualified).
147
+
* Changed include directives to use proper case sensitivity and forward slashes, improving portability.
148
+
* Fixed warning C4061 "enumerator 'Meow' in switch of enum 'Kitten' is not explicitly handled by a case label". This warning is off-by-default and was fixed as an exception to the Standard Library's general policy for warnings. (The Standard Library is /W4 clean, but does not attempt to be /Wall clean. Many off-by-default warnings are extremely noisy and aren't intended to be used on a regular basis.)
149
+
* Improved std::list's debug checks. List iterators now check operator->(), and list::unique() now marks iterators as invalidated.
150
+
* Fixed uses-allocator metaprogramming in tuple.
151
+
152
+
##### Performance/Throughput Fixes
153
+
* Worked around interactions with noexcept which prevented inlining std::atomic's implementation into functions that use Structured Exception Handling (SEH).
154
+
* Changed the Standard Library's internal _Deallocate() function to optimize into smaller code, allowing it to be inlined into more places.
155
+
* Changed std::try_lock() to use pack expansion instead of recursion.
156
+
* Improved std::lock()'s deadlock avoidance algorithm to use lock() operations instead of spinning on all the locks' try_lock()s.
157
+
* Enabled the Named Return Value Optimization in system_category::message().
158
+
* conjunction and disjunction now instantiate N + 1 types, instead of 2N + 2 types.
159
+
* std::function no longer instantiates allocator support machinery for each type-erased callable, improving throughput and reducing .obj size in programs that pass many distinct lambdas to std::function.
160
+
* allocator_traits<std::allocator> contains manually inlined std::allocator operations, reducing code size in code that interacts with std::allocator through allocator_traits only (i.e. most code).
161
+
* The C++11 minimal allocator interface is now handled by the Standard Library calling allocator_traits directly, instead of wrapping the allocator in an internal class _Wrap_alloc. This reduces the code size generated for allocator support, improves the optimizer's ability to reason about Standard Library containers in some cases, and provides a better debugging experience (as now you see your allocator type, rather than _Wrap_alloc<yourallocatortype> in the debugger).
162
+
* Removed metaprogramming for customized allocator::reference, which allocators aren't actually allowed to customize. (Allocators can make containers use fancy pointers but not fancy references.)
163
+
* The compiler front-end was taught to unwrap debug iterators in range-based for-loops, improving the performance of debug builds.
164
+
* basic_string's internal shrink path for shrink_to_fit() and reserve() is no longer in the path of reallocating operations, reducing code size for all mutating members.
165
+
* basic_string's internal grow path is no longer in the path of shrink_to_fit().
166
+
* basic_string's mutating operations are now factored into non-allocating fast path and allocating slow path functions, making it more likely for the common no-reallocate case to be inlined into callers.
167
+
* basic_string's mutating operations now construct reallocated buffers in the desired state rather than resizing in place. For example, inserting at the beginning of a string now moves the content after the insertion exactly once (either down or to the newly allocated buffer), instead of twice in the reallocating case (to the newly allocated buffer and then down).
168
+
* Operations calling the C standard library in <string> now cache errno's address to remove repeated interaction with TLS.
169
+
* Simplified is_pointer's implementation.
170
+
* Finished changing function-based Expression SFINAE to struct/void_t-based.
171
+
* Standard Library algorithms now avoid postincrementing iterators.
172
+
* Fixed truncation warnings when using 32-bit allocators on 64-bit systems.
173
+
* std::vector move assignment is now more efficient in the non-POCMA non-equal-allocator case, by reusing the buffer when possible.
174
+
175
+
##### Readability And Other Improvements
176
+
* The Standard Library now uses C++14 constexpr unconditionally, instead of conditionally-defined macros.
177
+
* The Standard Library now uses alias templates internally.
178
+
* The Standard Library now uses nullptr internally, instead of nullptr_t{}. (Internal usage of NULL has been eradicated. Internal usage of 0-as-null is being cleaned up gradually.)
179
+
* The Standard Library now uses std::move() internally, instead of stylistically misusing std::forward().
180
+
* Changed static_assert(false, "message") to #error message. This improves compiler diagnostics because #error immediately stops compilation.
181
+
* The Standard Library no longer marks functions as __declspec(dllimport). Modern linker technology no longer requires this.
182
+
* Extracted SFINAE to default template arguments, which reduces clutter compared to return types and function argument types.
183
+
* Debug checks in <random> now use the Standard Library's usual machinery, instead of the internal function _Rng_abort() which called fputs() to stderr. This function's implementation is being retained for binary compatibility, but has been removed in the next binary-incompatible version of the Standard Library.
184
+
185
+
95
186
96
187
### Open source library support
97
188
Vcpkg is an open-source command line tool that greatly simplifies the process of acquiring and building open source C++ static libs and DLLS in Visual Studio. For more information, see [vcpkg: A package manager for C++](vcpkg.md).
0 commit comments