C++11/14/17 Features In VS 2015 Preview

Stephan T. Lavavej - MSFT

Visual Studio 2015 Preview is now available, so here’s an updated feature table for the Core Language:  

C++11 Core Language Features

VS 2013

VS 2015 Preview

Notes

Rvalue references

Partial

Yes

 

ref-qualifiers

No

Yes

 

Non-static data member initializers

Partial

Partial

[1]

Variadic templates

Yes

Yes

 

Initializer lists

Partial

Partial

[1]

static_assert

Yes

Yes

 

auto

Yes

Yes

 

Trailing return types

Yes

Yes

 

Lambdas

Yes

Yes

 

decltype

Yes

Yes

 

Right angle brackets

Yes

Yes

 

Default template args for function templates

Yes

Yes

 

Expression SFINAE

No

No

 

Alias templates

Yes

Yes

 

Extern templates

Yes

Yes

 

nullptr

Yes

Yes

 

Strongly typed enums

Yes

Yes

 

Forward declared enums

Yes

Yes

 

Attributes

No

No

 

constexpr

No

Partial

[2]

Alignment

Partial

Yes

 

Delegating constructors

Yes

Yes

 

Inheriting constructors

No

Yes

 

Explicit conversion operators

Yes

Yes

 

char16_t and char32_t

No

Yes

[NEW]

Unicode string literals

No

Yes

[NEW]

Raw string literals

Yes

Yes

 

Universal character names in literals

No

No

 

User-defined literals

No

Yes

 

Standard-layout and trivial types

Yes

Yes

 

Defaulted and deleted functions

Partial

Yes

 

Extended friend declarations

Yes

Yes

 

Extended sizeof

No

Yes

 

Inline namespaces

No

Yes

 

Unrestricted unions

No

Yes

 

Local and unnamed types as template args

Yes

Yes

 

Range-based for-loop

Yes

Yes

 

override and final

Yes

Yes

 

Minimal GC support

Yes

Yes

 

noexcept

No

Yes

 

C++11 Core Language Features: Concurrency

VS 2013

VS 2015 Preview

Notes

Reworded sequence points

Yes

Yes

[3]

Atomics

Yes

Yes

 

Strong compare and exchange

Yes

Yes

 

Bidirectional fences

Yes

Yes

 

Memory model

Yes

Yes

[3]

Data-dependency ordering

Yes

Yes

 

Data-dependency ordering: attributes

No

No

 

exception_ptr

Yes

Yes

 

quick_exit and at_quick_exit

No

Yes

 

Atomics in signal handlers

No

No

 

Thread-local storage

Partial

Yes

 

Magic statics

No

Yes

 

C++11 Core Language Features: C99

VS 2013

VS 2015 Preview

Notes

__func__

Partial

Yes

 

C99 preprocessor

Partial

Partial

[4]

long long

Yes

Yes

 

Extended integer types

N/A

N/A

[5]

C++14 Core Language Features

VS 2013

VS 2015 Preview

Notes

Tweaked wording for contextual conversions

Yes

Yes

[6]

Binary literals

No

Yes

[NEW]

auto and decltype(auto) return types

No

Yes

 

init-captures

No

Yes

 

Generic lambdas

No

Yes

[NEW]

Variable templates

No

No

 

Extended constexpr

No

No

 

NSDMIs for aggregates

No

No

 

Avoiding/fusing allocations

No

No

 

[[deprecated]] attributes

No

No

 

Sized deallocation

No

Partial

[7]

Digit separators

No

RTM

[8]

C++1z (C++17?) Core Language Features

VS 2013

VS 2015 Preview

Notes

New rules for auto with braced-init-lists

No

No

[9]

Terse static_assert

No

No

 

typename in template template-parameters

No

No

 

Removing trigraphs

Yes

Yes

[10]

Nested namespace definitions

No

No

 

N4259 std::uncaught_exceptions()

No

No

[11]

N4261 Fixing qualification conversions

No

No

 

N4266 Attributes for namespaces and enumerators

No

No

 

N4267 u8 character literals

No

No

 

N4268 Allowing more non-type template args

No

No

 

N4295 Fold expressions

No

No

 

  Notes:   [NEW] Implemented after the CTP3 table was published.   [1] NSDMIs and initializer lists were previously listed as Yes, but have been downgraded to Partial.  After users encountered silent bad codegen when using braced-init-lists in NSDMIs and mem-initializer-lists, the compiler team blocked these broken scenarios with a compiler error C2797.  This VCBlog post published in August has more info, and this is planned to be completely fixed in 2015 RTM.   [2] C++11 constexpr support is still Partial; one major limitation is that it doesn’t exhibit “optional” behavior on function templates, which the Standard Library extensively relies on.  (For example, plus<T>’s function call operator is marked constexpr in the Standard.  This allows plus<int> to be used in constant expressions, even though plus<string> allocates memory which totally disqualifies it from being a constant expression.)  Other limitations: literal class types are partially supported, array literals and aggregate literals aren’t supported yet, and N4140 12.1 [class.ctor]/5’s rule about making implicitly-defined default constructors automatically constexpr hasn’t been implemented yet.   [3] I previously listed C++11’s reworded sequence points and memory model as Not Applicable, which continually confused readers.  I’m now listing them as Yes because they are indeed implemented, although the compiler team didn’t have to do anything to achieve that.  (These papers clarified C++11’s interaction with multithreading, but VC supported multithreading long before the Standard did.)   [4] C99 preprocessor support is listed as Partial because variadic macros are supported, but the compiler team is aware of a significant number of bugs in this area.   [5] Extended integer types are truly Not Applicable.  Implementations are permitted but not required to have such types, and VC doesn’t have them.  Saying either Yes or No would be inaccurate, hence N/A.   [6] We previously listed “Tweaked wording for contextual conversions” as No, but it’s now listed as Yes for both 2013 and 2015 Preview.  After looking at it, we realized that this feature relaxed overly-strict rules that VC never implemented in the first place.  Yay, conformance!  :->   [7] Sized deallocation was previously listed as Yes, because I mistakenly believed that only library support was required, and that compiler support was optional.  Compiler support is actually necessary, so this is now listed as Partial.   [8] Digit separators have been implemented, but they were checked in just after Preview branched.  They’ll be available in 2015 RTM.   [9] The “new rules for auto with braced-init-lists” have been implemented and are almost ready to be checked in.  They’ll be available in 2015 RTM, barring catastrophes like asteroid impacts or the Committee changing its mind.   [10] Both 2013 and 2015 Preview default to disabling trigraphs, which is now conformant according to C++17.   [11] std::uncaught_exceptions() is listed here as an honorary Core Language feature because the Core Working Group put it up for a vote.  I might change this in the future.  (Other library features like exception_ptr are listed here, but that was because I followed GCC’s tables for easy comparisons.)   Additionally, the papers N4262 “Wording for Forwarding References” and N4285 “Cleanup for exception-specification and throw-expression” were voted into C++17, but they’re purely editorial, so they aren’t listed in this feature table.   Stephan T. Lavavej Senior Developer – Visual C++ Libraries

stl@microsoft.com

Posted in C++

0 comments

Discussion is closed.

Feedback usabilla icon