C++ 11 :
- auto and decltype
- defaulted and deleted functions
- final and override
- trailing return type
- rvalue references
- move constructors and move assignment operators
- scoped enums
- constexpr and literal types
- list initialization
- delegating and inherited constructors
- brace-or-equal initializers
- nullptr
- long long
- char16_t and char32_t
- type aliases
- variadic templates
- generalized (non-trivial) unions
- generalized PODs (trivial types and standard-layout types)
- Unicode string literals
- user-defined literals
- attributes
- lambda expressions
- noexcept specifier and noexcept operator
- alignof and alignas
- multithreaded memory model
- thread-local storage
- GC interface (removed in C++23)
- range-for (based on a Boost library)
- static_assert (based on a Boost library)
C++14 :
- variable templates
- generic lambdas
- lambda init-capture
- new/delete elision
- relaxed restrictions on constexpr functions
- binary literals
- digit separators
- return type deduction for functions
- aggregate classes with default non-static member initializers.
C++17 :
- u8 character literal
- made noexcept part of type system
- new order of evaluation rules
- lambda capture of *this
- constexpr
compile-time if constexpr
- Variables
initializers for if and switch
guaranteed copy elision
- Templates
fold-expressions ( ... )
class template argument deduction tuple t(4, 3, 2.5)
non-type template parameters declared with
auto
- Namespaces
simplified nested namespaces
using
-declaration declaring multiple namesattribute namespaces don't have to repeat
- new attributes:
[[fallthrough]]
[[maybe_unused]]
[[nodiscard]]
- __has_include
C++20:
- Feature test macros
- Three-way comparison operator <=> and operator==() = default
- Designated initializers
- Init-statements and initializers in range-for
- char8_t
- New attributes:
[[no_unique_address]]
,[[likely]]
,[[unlikely]]
- Pack-expansions in lambda init-captures
- Removed the requirement to use
typename
to disambiguate types in many contexts - consteval, constinit
- Further relaxed constexpr
- Signed integers are 2's complement
- Bitwise shift operators unified behavior
- aggregate initialization using parentheses
- coroutines
- modules
- Constraints and concepts
- Abbreviated function template
- DR11: array new can deduce array size