We’re still working on finishing VS 2015 RTM, but we’re definitely done with adding new features, so we can publish final feature tables. Let’s start with the STL, where we implemented a bunch of stuff after publishing 2015 RC’s features in April. Whenever I mention C++17 below, I’m referring to the current Working Paper N4527.
Standard Library This table of C++14/17 Library features contains new rows for the features that were voted into C++17 in May:
Status |
Std |
Paper |
Title |
missing |
C++14 |
SFINAE-Friendly result_of |
|
missing |
C++17 |
Improving pair And tuple |
|
missing |
C++17 |
shared_mutex (Untimed) |
|
VS 2015 |
C++14 |
constexpr For <complex> |
|
VS 2015 |
C++14 |
constexpr For <chrono> |
|
VS 2015 |
C++14 |
constexpr For <array> |
|
VS 2015 |
C++14 |
constexpr For <initializer_list>, <tuple>, <utility> |
|
VS 2015 |
C++14 |
integral_constant::operator()() |
|
VS 2015 |
C++14 |
UDLs For <chrono>, <string> (1729ms, “meow”s, etc.) |
|
VS 2015 |
C++14 |
Null Forward Iterators |
|
VS 2015 |
C++14 |
quoted() |
|
VS 2015 |
C++14 |
Heterogeneous Associative Lookup |
|
VS 2015 |
C++14 |
integer_sequence |
|
VS 2015 |
C++14 |
shared_mutex (Timed) |
|
VS 2015 |
C++14 |
exchange() |
|
VS 2015 |
C++14 |
Fixing constexpr Member Functions Without const |
|
VS 2015 |
C++14 |
get<T>() |
|
VS 2015 |
C++14 |
Dual-Range equal(), is_permutation(), mismatch() |
|
VS 2015 |
C++14 |
Sized Deallocation |
|
VS 2015 |
C++14 |
UDLs For <complex> (3.14i, etc.) |
|
VS 2015 |
C++14 |
constexpr For <functional> |
|
VS 2015 |
C++14 |
tuple_element_t |
|
VS 2015 |
C++14 |
Renaming shared_mutex (Timed) To shared_timed_mutex |
|
VS 2015 |
C++17 |
void_t |
|
VS 2015 |
C++17 |
Safe Conversions In unique_ptr<T[]> |
|
VS 2015 |
C++17 |
invoke() |
|
2015 opt-in |
C++17 |
Removing auto_ptr, random_shuffle(), And Old <functional> Stuff |
|
VS 2015 |
C++17 |
noexcept Cleanups |
|
VS 2015 |
C++17 |
uncaught_exceptions() |
|
VS 2015 |
C++17 |
Trivially Copyable reference_wrapper |
|
VS 2015 |
C++17 |
insert_or_assign()/try_emplace() For map/unordered_map |
|
VS 2015 |
C++17 |
size(), empty(), data() |
|
VS 2015 |
C++17 |
Precisely Constraining unique_ptr Assignment |
|
VS 2015 |
C++17 |
bool_constant |
|
VS 2013 |
C++14 |
Minimal Container Element Requirements |
|
VS 2013 |
C++14 |
Transparent Operator Functors (less<>, etc.) |
|
VS 2013 |
C++14 |
Alias Templates For <type_traits> (decay_t, etc.) |
|
VS 2013 |
C++14 |
make_unique() |
|
VS 2013 |
C++17 |
Supporting Incomplete Types In vector/list/forward_list |
|
N/A |
C++14 |
Discouraging rand() |
|
N/A |
C++17 |
Contiguous Iterators |
“2015 opt-in” means that this is guarded by a macro. By default, we provide auto_ptr/etc. If you define _HAS_AUTO_PTR_ETC to 0 project-wide (which you should do via the command line or project file, not via #define), then we won’t provide auto_ptr/etc. In the next major version, I’m planning to make this opt-out, and in the major version after that, I’m planning to eliminate auto_ptr/etc. entirely. Now would be a good time to start migrating your code. “N/A” means that these proposals altered the Standard’s wording, but did not physically affect implementers or users. I’ve listed them as Not Applicable for the sake of completeness. Here’s a detailed summary of our status: Our C99 Standard Library implementation is complete, except for tgmath.h (which is irrelevant in C++) and the CX_LIMITED_RANGE/FP_CONTRACT pragma macros. On top of that, our C++11 Standard Library implementation is complete. On top of that, our C++14 Standard Library implementation is complete, except for Expression SFINAE in result_of (N3462) and std::function (LWG 2132), plus 11 more Library Issues. On top of that, our C++17-so-far Standard Library implementation is complete, except for pair/tuple improvements (N4387) and untimed shared_mutex (N4508), plus 10 Library Issues. Any remaining exceptions are bugs. (By the way, we’ve fixed roughly 160 bugs in the STL between 2013 and 2015. A year ago, I listed the first batch of fixes. I’ll write about the rest of the fixes soon.) For example, we’ve implemented every occurrence of constexpr in C++17-so-far’s STL, with a very small number of exceptions, which are tracked by DevDiv#1184873/Connect#1414341 and DevDiv#1188232:
- (C99) offsetof
- (C++11) numeric_limits<float/double/long double>::quiet_NaN()/signaling_NaN()
- (C++11) mutex’s default constructor
- (C++14) error_category’s default constructor
- (C++14) min()/max()/minmax() for initializer_list
- (C++17) min_element()/max_element()/minmax_element()
We’ve been focused on achieving Standard conformance, which is higher priority than implementing the various Technical Specifications that are being produced by the Committee. (We think TSes are important, but the Standard is even more important.) However, we’ve implemented a couple of TS things: the Filesystem “V3” TS (N4100) and Uniform Container Erasure (N4529 [container.erasure]). Core Language
C++11 Core Language Features |
VS 2013 |
VS 2015 |
Notes |
Partial |
Yes |
||
No |
Yes |
||
Partial |
Yes |
||
Yes |
Yes |
||
Partial |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
No |
No |
[1] |
|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
No |
Yes |
[RTM] |
|
No |
Yes |
[RTM] |
|
Partial |
Yes |
||
Yes |
Yes |
||
No |
Yes |
||
Yes |
Yes |
||
No |
Yes |
||
No |
Yes |
||
Yes |
Yes |
||
No |
Yes |
||
No |
Yes |
||
Yes |
Yes |
||
Partial |
Yes |
||
Yes |
Yes |
||
No |
Yes |
||
No |
Yes |
||
No |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
No |
Yes |
||
C++11 Core Language Features: Concurrency |
VS 2013 |
VS 2015 |
Notes |
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
No |
Yes |
[RTM] |
|
Yes |
Yes |
||
No |
Yes |
||
Yes |
Yes |
||
Partial |
Yes |
||
No |
Yes |
||
C++11 Core Language Features: C99 |
VS 2013 |
VS 2015 |
Notes |
Partial |
Yes |
||
Partial |
Partial |
[2] |
|
Yes |
Yes |
||
N/A |
N/A |
[3] |
|
C++14 Core Language Features |
VS 2013 |
VS 2015 |
Notes |
Yes |
Yes |
||
No |
Yes |
||
No |
Yes |
||
No |
Yes |
||
No |
Yes |
||
No |
No |
||
No |
No |
||
No |
No |
||
N/A |
N/A |
[4] |
|
No |
Yes |
[RTM] |
|
No |
Yes |
||
No |
Yes |
||
C++1z (C++17?) Core Language Features |
VS 2013 |
VS 2015 |
Notes |
No |
Yes |
||
No |
No |
||
No |
Yes |
||
Yes |
Yes |
||
No |
No |
||
No |
No |
||
No |
Yes |
[RTM] |
|
No |
Yes |
[RTM] |
|
No |
No |
||
No |
No |
[RTM] These features were implemented between RC and RTM. [1] We’re planning to start implementing Expression SFINAE in the compiler immediately after 2015 RTM, and we’re planning to deliver it in an Update to 2015, supported for production use. (But not necessarily 2015 Update 1. It might take longer.) [2] C99 preprocessor support is unchanged. It’s Partial because while the compiler supports variadic macros, our preprocessor’s behavior doesn’t conform to C99/C++11 in many ways. [3] “Extended integer types” are listed as Not Applicable because the Standard permits but doesn’t require support for types longer than long long. We’ve chosen not to support such types, which is conformant behavior. Neither GCC nor Clang has implemented such types. [4] “Avoiding/fusing allocations” is listed as Not Applicable because the Standard permits but doesn’t require this optimization. We’ve chosen not to implement it (at least for now), which is conformant behavior. A note about C++11 constexpr: this is a large feature with complicated interactions throughout the Core Language, implemented in a compiler codebase undergoing modernization, being shipped for the first time. It contains bugs/limitations, some of which you might notice, and many of which will be fixed in Updates. (For example, the compiler is currently unable to emit initializers for non-scalar static constexpr data members, including character arrays. This scenario has been blocked with a warning-as-error C4579.) Nevertheless, I’ve chosen to list the compiler’s support for C++11 constexpr as being complete, because the STL is successfully using it, and quite intensively so. (The STL’s handful of missing constexpr occurrences are due to library-only issues, the absence of magic compiler hooks, and the absence of C++14 extended constexpr loops.) Finally, we’d like to thank everyone who’s reported bugs during 2015’s development cycle, not just in constexpr but throughout the whole product. If you encounter any more bugs, please report them via Microsoft Connect or Send A Smile/Frown. Stephan T. Lavavej Senior Developer – Visual C++ Libraries
thanks for ur articles, solving my problems