📜 ⬆️ ⬇️

C ++ 11/14/17 features in Visual Studio 2015 RTM

The release date of Visual Studio 2015 is near, and many would like to know how things are with the support of C ++ standards in the Microsoft compiler.


Standard Library



The table shows the capabilities of the C ++ 14/17 library, for which we voted in May.
')
Status
Std
Paper
Title
missing
C ++ 14N3462
  SFINAE-Friendly result_of 

missing
C ++ 17
N4387

  Improving pair And tuple 

missing
C ++ 17
N4508

  shared_mutex (Untimed) 

VS2015
C ++ 14
N3302

  constexpr For <complex> 

VS2015
C ++ 14
N3469

  constexpr For <chrono> 

VS2015
C ++ 14
N3470

  constexpr For <array> 

VS2015
C ++ 14
N3471

  constexpr For <initializer_list>, <tuple>, <utility> 

VS2015
C ++ 14
N3545

  integral_constant :: operator () () 

VS2015
C ++ 14
N3642

  UDLs For <chrono>, <string> (1729ms, "meow" s, etc.) 

VS2015
C ++ 14
N3644

  Null forward iterators 

VS2015
C ++ 14
N3654

  quoted () 

VS2015
C ++ 14
N3657

  Heterogeneous Associative Lookup 

VS2015
C ++ 14
N3658

  integer_sequence 

VS2015
C ++ 14
N3659

  shared_mutex (Timed) 

VS2015
C ++ 14
N3668

  exchange () 

VS2015
C ++ 14
N3669

  Fixing constexpr Member Functions Without const 

VS2015
C ++ 14
N3670

  get <T> () 

VS2015
C ++ 14
N3671

  Dual-Range equal (), is_permutation (), mismatch () 

VS2015
C ++ 14
N3778

  Sized Deallocation 

VS2015
C ++ 14
N3779

  UDLs For <complex> (3.14i, etc.) 

VS2015
C ++ 14
N3789

  constexpr For <functional> 

VS2015
C ++ 14
N3887

  tuple_element_t 

VS2015
C ++ 14
N3891

  Renaming shared_mutex (Timed) To shared_timed_mutex 

VS2015
C ++ 17
N3911

  void_t 

VS2015
C ++ 17
N4089

  Safe Conversions In unique_ptr <T []> 

VS2015
C ++ 17
N4169

  invoke () 

2015 opt-in
C ++ 17
N4190

  Removing auto_ptr, random_shuffle (), And Old <functional> Stuff 

VS2015
C ++ 17
N4258

  noexcept Cleanups 

VS2015
C ++ 17
N4259

  uncaught_exceptions () 

VS2015
C ++ 17
N4277

  Trivially Copyable reference_wrapper 

VS2015
C ++ 17
N4279

  insert_or_assign () / try_emplace () For map / unordered_map 

VS2015
C ++ 17
N4280

  size (), empty (), data () 

VS2015
C ++ 17
N4366

  Precisely Constraining unique_ptr Assignment 

VS2015
C ++ 17
N4389

  bool_constant 

VS2013
C ++ 14
N3346

  Minimal Container Element Requirements 

VS2013
C ++ 14
N3421

  Transparent Operator Functors (less <>, etc.) 

VS2013
C ++ 14
N3655

  Alias ​​Templates For <type_traits> (decay_t, etc.) 

VS2013
C ++ 14
N3656

  make_unique () 

VS2013
C ++ 17
N4510

  Supporting Incomplete Types In vector / list / forward_list 

N / A
C ++ 14
N3924

  Discouraging rand () 

N / A
C ++ 17
N4284

  Contiguous iterators 



2015 opt-in means that there is a protective macro. The default is auto ptr / etc. If you define _HAS_AUTO_PTR_ETC to 0 at the project level (via a command parameter or project file), then auto ptr / etc is not provided. In the future, an opt-out is provided, and through the release auto ptr / etc will be removed altogether.

"N / A" means that these features make changes to the wording of the standard, but do not affect the implementers or users.

The implementation of the standard C99 library is ready, except for tgmath.h (which is irrelevant to C ++) and the CX_LIMITED_RANGE / FP_CONTRACT macro-pragmas.

The implementation of the standard C ++ 11 library is ready.
The implementation of the standard C ++ 14 library is ready, with the exception of Expression SFINAE as a result ( N 3462 ) and std :: function ( LWG 2132 ), plus 11 open Library Issues.

The implementation of the standard C ++ 17 library is ready, except for improvements in the pair / tuple ( N 4387 ) and untimed shared_mutex ( N 4508 ), plus 10 open Library Issues.

All remaining exceptions are bugs. (At the moment, we fixed about 160 bugs in the STL between the 2013 and 2015 releases. A year ago, a list of the first sets of fixes was provided.


At the moment, the team is focused on obtaining full compliance with the standard, which is higher in priority than the implementation of the technical specifications approved by the committee. (we think that TSs are important, but the standard is even more important) Nevertheless, we have already implemented several TS capabilities: Filesystem "V3" TS ( N 4100 ) and Uniform Container Erasure ( N 4529 [container.erasure]).

Core language



C ++ 11 Core Language Features
VS 2013
VS 2015
Notes
Rvalue references
PartialYes
ref-qualifiers
NoYes
Non-static data member initializers
PartialYes
Variadic templates
YesYes
Initializer lists
PartialYes
static_assert
YesYes
auto
YesYes
Trailing return types
YesYes
Lambdas
YesYes
decltype
YesYes
Right angle brackets
YesYes
Default template args for function templates
YesYes
Expression SFINAE
NoNo[one]
Alias ​​templates
YesYes
Extern templates
YesYes
nullptr
YesYes
Strongly typed enums
YesYes
Forward declared enums
YesYes
Attributes
NoYes[RTM]
constexpr
NoYes[RTM]
Alignment
PartialYes
Delegating constructors
YesYes
Inheriting constructors
NoYes
Explicit conversion operators
YesYes
char16_t and char32_t
NoYes
Unicode string literals
NoYes
Raw string literals
YesYes
Universal character names in literals
NoYes
User-defined literals
NoYes
Standard-layout and trivial types
YesYes
Defaulted and deleted functions
PartialYes
Extended friend declarations
YesYes
Extended sizeof
NoYes
Inline namespaces
NoYes
Unrestricted unions
NoYes
Local and unnamed types as template args
YesYes
Range-based for-loop
YesYes
override and final
YesYes
Minimal GC support
YesYes
noexcept
NoYes
C ++ 11 Core Language Features: Concurrency
VS 2013
VS 2015
Notes
Rewired sequence points
YesYes
Atomics
YesYes
Strong compare and exchange
YesYes
Bidirectional fences
YesYes
Memory model
YesYes
Data dependency ordering
YesYes
Data-dependency ordering: attributes
NoYes[RTM]
exception_ptr
YesYes
quick_exit and at_quick_exit
NoYes
Atomics in signal handlers
YesYes
Thread-local storage
PartialYes
Magic statics
NoYes
C ++ 11 Core Language Features: C99
VS 2013
VS 2015
Notes
__func__
PartialYes
C99 preprocessor
PartialPartial[2]
long long
YesYes
Extended integer types
N / AN / A[3]
C ++ 14 Core Language Features
VS 2013
VS 2015
Notes
Tweaked wording for contextual conversions
YesYes
Binary literals
NoYes
auto and decltype (auto) return types
NoYes
init-captures
NoYes
Generic lambdas
NoYes
Variable templates
NoNo
Extended constexpr
NoNo
NSDMIs for aggregates
NoNo
Avoiding / fusing allocations
N / AN / A[four]
[[deprecated]] attributes
NoYes[RTM]
Deal dealation
NoYes
Digit separators
NoYes
C ++ 1z (C ++ 17?) Core Language Features
VS 2013
VS 2015
Notes
New rules for auto with braced-init-lists
NoYes
Terse static_assert
NoNo
typename in template template-parameters
NoYes
Removing trigraphs
YesYes
Nested namespace definitions
NoNo
Fixing qualification conversions
NoNo
Attributes for namespaces and enumerators
NoYes[RTM]
u8 character literals
NoYes[RTM]
Allowing more non-type template args
NoNo
Fold expressions
NoNo


[RTM] These features are implemented between RC and RTM.

[1] We are planning to start implementation of Expression SFINAE in the compiler right after 2015 RTM, and plan to release it in the update. But maybe it will not work in 2015 Update 1.

[2] Support for the C99 preprocessor remained unchanged. Partial status remains in force since, despite the fact that the compiler supports variadic macros, the behavior of the preprocessor does not conform to the C99 / C ++ 11 standard in many things.

[3] “Extended integer types” are in the Not Applicable list due to the fact that the standard does not require support for types longer than long long. We prepared not to support such types, which is allowed behavior. GCC and Clang also did not implement these types.

[4] “Avoiding / fusing allocations” is on the Not Applicable list for the reason that the standard allows, but does not require such optimization. So far, it has been decided not to implement this feature, which is permitted behavior.

A note on C ++ 11 constexpr: this is a very big “feature” with a complex interaction, implemented on the basis of a new compiler code and required a very serious modernization of many components. We suspect that in the current version there are bugs and restrictions, and we will release fixes in future updates.
We want to say a big thank you to everyone who sent error reports for intermediate versions of the compiler. If you find new bugs please send them to us through Microsoft Connect and Send A Smile / Frown .

Source: https://habr.com/ru/post/262805/


All Articles