Version

Borland C++ 4.0 was my first C++ compiler


The language was invented in 1983 and it was standardized by ISO in 1998.

C++ 98

    • The first standard version of C++.

C++ 03

    • They found some bugs and fixed them five years later.

C++ 11

Types

    • auto - Deduce the type of a variable from its initializer.

    • decltype - Get the type of an expression.

    • enum class - Do not export their enumerators to the surrounding scope.

    • nullptr -

    • const / mutable

Containers and iterators

    • Range-for - Iterate through a "range", defined by a begin() and end().

    • Initializer lists

    • Uniform initialization

Functional programming

Class improvements

    • Delegating constructors - Call a constructor from a constructor.

    • In-class member initializers - Initialized data member when it is declared in the class. Constructor's initialization to override.

    • override - Mark that a function is overiding a base class function.

    • final - Prevent a virtual function from being overridden further.

    • default -

    • delete -

Compile time improvements

    • constexpr - To mark functions to be evaluated at compile time.

    • static_assert - Assert to check things at compile time.

Std library improvements

    • std::shared_ptr

    • std::unique_ptr

    • std::weak_ptr

    • std::function

    • std::bind

Variadic templates

Move semantics

Rvalue references and move constructors

Other features

    • alignas - specify a desired alignment for some allocation

    • alignof - Returns the alignment of its argument

    • Extern template

    • Attributes noreturn and carries_dependency

C++ 14

Language

  • Binary literals - Use 0b to enter binary numbers.

  • Digit separators - Use ' to seperate numbers for readability, does not affect the numeric value. Ex int million = 1'000'000;

  • [[deprecated]] - Mark entity deprecated to give a warning message to discouraged use.

  • decltype(auto) -

  • Constexpr -

Library

  • make_unique -

  • Type transformation _t aliases

C++ 17

Language

    • Nested namespaces - Use namespace resolution operator to create nested namespace definitions.

    • [[fallthrough]]

    • [[nodiscard]]

    • [[maybe_unused]]

Library

    • std::variant

    • std::optional

    • std::any

    • std::string_view

    • std::filesystem

    • std::invoke

    • std::apply

    • Parallel algorithms

Reference