# The ISO C++ Standard
In 1998, the there was a first publication of the standard making C++ an internally standardized language. From that time, C++ has evolved resulting in different dialects of C++. On this page, you can find an overview of all different standards and their changes compared to the previous version. The details on how to use these features is described on more specialized pages.
# Current Working Drafts
All published ISO standards are available for sale from the ISO store ( http://www.iso.org (opens new window) ). The working drafts of the C++ standards are publicly available for free though.
The different versions of the standard:
- Upcoming (Sometimes referred as C++20 or C++2a): Current working draft (opens new window) (HTML-version (opens new window))
- Proposed (Sometimes referred as C++17 or C++1z): March 2017 working draft N4659 (opens new window).
- C++14 (Sometimes referred as C++1y): November 2014 working draft N4296 (opens new window)
- C++11 (Sometimes referred as C++0x): February 2011 working draft N3242 (opens new window)
- C++03
- C++98
# C++17
The C++17 standard is feature complete and has been proposed for standardization. In compilers with experimental support for these features, it is usually referred to as C++1z.
# Language Extensions
- Fold Expressions (opens new window)
- declaring non-type template arguments with
auto
(opens new window) - Guaranteed copy elision (opens new window)
- Template parameter deduction for constructors (opens new window)
- Structured bindings (opens new window)
- Compact nested namespaces (opens new window)
- New attributes:
[[fallthrough]]
,[[nodiscard]]
,[[maybe_unused]]
(opens new window) - Default message for
static_assert
(opens new window) - Initializers in
if
andswitch
- Inline variables
if constexpr
(opens new window)- Order of expression evaluation guarantees
- Dynamic memory allocation for over-aligned data
# Library Extensions
std::optional
(opens new window)std::variant
(opens new window)std::string_view
(opens new window)merge()
andextract()
for associative containers- A file system library (opens new window) with the
<filesystem>
header (opens new window). - Parallel versions of most of the standard algorithms (opens new window) (in the
<algorithm>
header (opens new window)). - Addition of mathematical special functions (opens new window) in the
<cmath>
header (opens new window). - Moving nodes between map<>, unordered_map<>, set<>, and unordered_set<>
# C++11
The C++11 standard is a major extension to the C++ standard. Below you can find an overview of the changes as they have been grouped on the isocpp FAQ (opens new window) with links to more detailed documentation.
# Language Extensions
# General Features (opens new window)
- auto (opens new window)
- decltype (opens new window)
- Range-for statement (opens new window)
- Initializer lists
- Uniform initialization syntax and semantics
- Rvalue references (opens new window) and move semantics (opens new window)
- Lambdas (opens new window)
- noexcept (opens new window) to prevent exception propagation
- constexpr (opens new window)
- nullptr (opens new window) – a null pointer literal
- Copying and rethrowing exceptions
- Inline namespaces
- User-defined literals
# Classes (opens new window)
- =default and =delete
- Control of default move and copy
- Delegating constructors
- In-class member initializers
- Inherited constructors
- Override controls: override
- Override controls: final
- Explicit conversion operators
# Other Types (opens new window)
- enum class
- long long – a longer integer
- Extended integer types
- Generalized unions
- Generalized PODs
# Templates (opens new window)
- Extern templates
- Template aliases
- Variadic templates
- Local types as template arguments
# Concurrency (opens new window)
- Concurrency memory model
- Dynamic initialization and destruction with concurrency
- Thread-local storage (opens new window)
# Miscellaneous Language Features (opens new window)
- What is the value of __cplusplus for C++11?
- Suffix return type syntax
- Preventing narrowing
- Right-angle brackets
- static_assert compile-time assertions (opens new window)
- Raw string literals
- Attributes
- Alignment
- C99 features
# Library Extensions
# General (opens new window)
- unique_ptr
- shared_ptr
- weak_ptr
- Garbage collection ABI
- tuple
- Type traits
- function and bind
- Regular Expressions
- Time utilities
- Random number generation
- Scoped allocators
# Containers and Algorithms (opens new window)
- Algorithms improvements
- Container improvements
- unordered_* containers
- std::array
- forward_list
# Concurrency (opens new window)
- Threads (opens new window)
- Mutual exclusion
- Locks (opens new window)
- Condition variables (opens new window)
- Atomics (opens new window)
- Futures and promises (opens new window)
- async (opens new window)
- Abandoning a process
# C++14
The C++14 standard is often referred to as a bugfix for C++11. It contains only a limited list of changes of which most are extensions to the new features in C++11. Below you can find an overview of the changes as they have been grouped on the isocpp FAQ (opens new window) with links to more detailed documentation.
# Language Extensions (opens new window)
- Binary literals
- Generalized return type deduction
- decltype(auto)
- Generalized lambda captures (opens new window)
- Generic lambdas (opens new window)
- Variable templates
- Extended
constexpr
- The
[[deprecated]]
attribute (opens new window) - Digit separators (opens new window)
# Library Extensions (opens new window)
- Shared locking
- User-defined literals for
std::
types std::make_unique
(opens new window)- Type transformation
_t
aliases - Addressing tuples by type (opens new window) (e.g.
get<string>(t)
) - Transparent Operator Functors (opens new window) (e.g.
greater<>(x)
) std::quoted
(opens new window)
# Deprecated / Removed
std::gets
(opens new window) was deprecated in C++11 and removed from C++14std::random_shuffle
(opens new window) is deprecated
# C++98
C++98 is the first standardized version of C++. As it was developed as an extension to C, many of the features which set apart C++ from C are added.
# Language Extensions (in respect to C89/C90)
- Classes, Derived classes, virtual member functions, const member functions
- Function overloading, Operator overloading
- Single line comments (Has been introduced in the C-languague with C99 standard)
- References
- new and delete
- boolean type (Has been introduced in the C-languague with C99 standard)
- templates
- namespaces
- exceptions
- specific casts
# Library Extensions
- The Standard Template Library
# C++03
The C++03 standard mainly addresses defect reports of the C++98 standard. Apart from these defects, it only adds one new feature.
# Language Extensions
# C++20
C++20 is the upcoming standard of C++, currently in development, based upon the C++17 standard. It's progress can be tracked on the official ISO cpp website (opens new window).
The following features are simply what has been accepted for the next release of the C++ standard, targeted for 2020.
# Language Extensions
No language extensions have been accepted for now.
# Library Extensions
No library extensions have been accepted for now.
# Remarks
When C++ is mentioned, often a reference is made to "the Standard". But what is exactly that standard?
C++ has a long history. Started as a small project by Bjarne Stroustrup within Bell Labs, by the early 90's it had become quite popular. Multiple companies were creating C++ compilers so that users could run their C++ compilers on a wide range of computers. But in order to facilitate this, all these competing compilers should share a single definition of the language.
At that point, the C language had successfully been standardized. This means that a formal description of the language was written. This was submitted to the American National Standards Institute (ANSI), which opened up the document for review and subsequently published it in 1989. One year later, the International Organization for Standards (Because it would have different acronyms in different languages they chose one form, ISO, derived from the Greek isos, meaning equal.) adopted the American standard as an International Standard.
For C++, it was clear from the beginning that there was an international interest. A workgroup within ISO was started (known as WG21, within SubCommittee 22). This workgroup drafted a first standard around 1995. But as we programmers know, there's nothing more dangerous to a planned delivery than last minute features, and that happened to C++ as well. In 1995, a cool new library named the STL surfaced, and the people working in WG21 decided to add a slimmed-down version to the C++ draft standard. Naturally, this caused the deadlines to be missed and only 3 years later did the document become final. ISO is a very formal organization, so the C++ Standard was christened with the not very marketable name of ISO/IEC 14882. As standards can be updated, this exact version became known as 14882:1998.
And indeed there was a demand to update the Standard. The Standard is a very thick document, which aims to exactly describe how C++ compilers should work. Even a slight ambiguity can be worth fixing, so by 2003 an update was released as 14882:2003. However, this did not add any feature to C++; the new features were scheduled for the second update.
Informally, this second update was known as C++0x, because it wasn't known whether this would take until 2008 or 2009. Well - that version also got a slight delay, which is why it became 14882:2011.
Luckily, WG21 decided not to let that happen again. C++11 was well-received and let to a renewed interest in C++. So, to keep the momentum, the third update went from planning to publishing in 3 years, to become 14882:2014.
The work didn't stop there, either. The C++17 standard has been proposed and the work for C++20 has been started.