Sunday, March 29, 2015

about open 2.1

[1] c++ 11 vs. c++ 14
C++14 is intended to be a small extension over C++11, featuring mainly bug fixes and small improvements.

* Function return type deduction

* Alternate type deduction on declaration
decltype for reference or non-reference type

* Relaxed constexpr restrictions
C++11 constexpr functions could only contain a single expression that is returned (as well as static_asserts and a small number of other declarations)
C++14 will relax these restrictions.


* Variable templates
In prior versions of C++, only functions, classes or type aliases could be templated. C++14 now allows the creation of variables that are templated.

* Aggregate member initialization

* Binary literals
Numeric literals in C++14 can be specified in binary form.

* Digit separators

* Generic lambdas
In C++11, lambda function parameters need to be declared with concrete types. C++14 relaxes this requirement, allowing lambda function parameters to be declared with the auto type specifier.

* Lambda capture expressions

* The attribute [[deprecated]]


No comments:

Post a Comment