Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/language/history"

From cppreference.com
< cpp‎ | language
(moved to cpp/20)
(moved C++11)
Line 49: Line 49:
 
* 2011 {{ttb|C++11}} (ISO/IEC 14882:2011) ([http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372 ISO Store]) ([http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf Post-publication draft]).
 
* 2011 {{ttb|C++11}} (ISO/IEC 14882:2011) ([http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372 ISO Store]) ([http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3337.pdf Post-publication draft]).
 
A large number of changes were introduced to both standardize existing practices and improve the abstractions available to the C++ programmers
 
A large number of changes were introduced to both standardize existing practices and improve the abstractions available to the C++ programmers
# New language features: {{rlp|auto}} and {{rlp|decltype}}, defaulted and deleted functions, {{rlp|final}} and {{rlp|override}}, {{rlp|function#Function_declaration|trailing return type}}, {{rlp|reference|rvalue references}}, {{rlp|move constructor}}s/{{rlp|move_operator|move assignment}}, {{rlp|enum|scoped enums}}, {{rlp|constexpr}} and [[cpp/named req/LiteralType|literal types]], {{rlp|list initialization}}, {{rlp|initializer list#Delegating constructor|delegating}} and {{rlp|using declaration|inherited}} constructors, brace-or-equal initializers, {{rlp|nullptr}}, {{rlp|types#Integer_types|long long}}, {{rlp|types#Character_types|char16_t and char32_t}}, {{rlp|type_alias|type alias}}es, {{rlp|parameter_pack|variadic templates}}, {{rlp|union|generalized unions}}, [[cpp/named req/PODType|generalized PODs]], {{rlp|string_literal|Unicode string literals}}, {{rlp|user_literal|user-defined literals}}, {{rlp|attributes}}, {{rlp|lambda|lambda expressions}}, {{rlp|noexcept_spec|noexcept}}, {{rlp|alignof}} and {{rlp|alignas}}, multithreaded memory model, {{rlp|storage_duration#Storage_duration|thread-local storage}}, [[cpp/memory#Garbage_collector_support|GC interface]], {{rlp|range-for|range for}} (based on a Boost library), {{rlp|static_assert|static assertions}} (based on a Boost library)
 
# New library features: [[cpp/atomic|atomic operations library]], emplace() and other use of rvalue references throughout all parts of the existing library, [[cpp/utility/initializer_list|std::initializer_list]], stateful and [[cpp/memory/scoped_allocator_adaptor|scoped]] allocators, [[cpp/container/forward_list|forward_list]], [[cpp/chrono|chrono library]], [[cpp/numeric/ratio|ratio library]], new algorithms, [[cpp/locale#Locale-independent_unicode_conversion_facets|Unicode conversion facets]]
 
 
# From TR1: all of TR1 except Special Functions.
 
# From TR1: all of TR1 except Special Functions.
 
# From Boost: [[cpp/thread|The thread library]], [[cpp/error/exception_ptr|exception_ptr]], [[cpp/error/error_code|error_code]] and [[cpp/error/error_condition|error_condition]], iterator improvements ([[cpp/iterator/begin|std::begin]], [[cpp/iterator/end|std::end]], [[cpp/iterator/next|std::next]], [[cpp/iterator/prev|std::prev]])
 
# From Boost: [[cpp/thread|The thread library]], [[cpp/error/exception_ptr|exception_ptr]], [[cpp/error/error_code|error_code]] and [[cpp/error/error_condition|error_condition]], iterator improvements ([[cpp/iterator/begin|std::begin]], [[cpp/iterator/end|std::end]], [[cpp/iterator/next|std::next]], [[cpp/iterator/prev|std::prev]])
 
# From C: C-style Unicode conversion functions
 
# From C: C-style Unicode conversion functions
 +
[[cpp/11|More changes in C++11]]
 
{{cpp/language/history/DR11}}
 
{{cpp/language/history/DR11}}
 
* 2011 Decimal floating-point TR (ISO/IEC TR 24733:2011) ([http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=38843 ISO Store]) ([http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2849.pdf 2009 draft])
 
* 2011 Decimal floating-point TR (ISO/IEC TR 24733:2011) ([http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=38843 ISO Store]) ([http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2849.pdf 2009 draft])

Revision as of 04:57, 24 December 2019

 
 
C++ language
General topics
Flow control
Conditional execution statements
if
Iteration statements (loops)
for
range-for (C++11)
Jump statements
Functions
Function declaration
Lambda function expression
inline specifier
Dynamic exception specifications (until C++17*)
noexcept specifier (C++11)
Exceptions
Namespaces
Types
Specifiers
const/volatile
decltype (C++11)
auto (C++11)
constexpr (C++11)
consteval (C++20)
constinit (C++20)
Storage duration specifiers
Initialization
Expressions
Alternative representations
Literals
Boolean - Integer - Floating-point
Character - String - nullptr (C++11)
User-defined (C++11)
Utilities
Attributes (C++11)
Types
typedef declaration
Type alias declaration (C++11)
Casts
Memory allocation
Classes
Class-specific function properties
explicit (C++11)
static

Special member functions
Templates
Miscellaneous
History of C++
 

Contents

Early C++

  • 1979: C with Classes first implemented
  1. New features: classes, member functions, derived classes, separate compilation, public and private access control, friends, type checking of function arguments, default arguments, inline functions, overloaded assignment operator, constructors, destructors, f() same as f(void), call-function and return-function (synchronization features, not in C++)
  2. Libraries: the concurrent task library (not in C++)
  • 1982: C with Classes reference manual published
  • 1984: C84 implemented, reference manual published
  • 1985: Cfront 1.0
  1. New features: virtual functions, function and operator overloading, references, new and delete operators, the keyword const, scope resolution operator
  2. Library additions: complex, string, iostream
  • 1985: The C++ Programming Language, 1st edition
  • 1986: The "whatis?" paper documenting the remaining design goals, including multiple inheritance, exception handling, and templates.
  • 1987: C++ support in GCC 1.15.3
  • 1989: Cfront 2.0
  1. New features: multiple inheritance, pointers to members, protected access, type-safe linkage, abstract classes, static and const member functions, class-specific new and delete
  2. Library additions: I/O manipulators
  • 1990: The Annotated C++ Reference Manual

This book described the language as designed, including some features that were not yet implemented. It served as the de-facto standard until the ISO.

  1. New features: namespaces, exception handling, nested classes, templates
  • 1991: Cfront 3.0
  • 1991: The C++ Programming Language, 2nd edition

Standard C++

  • 1990 ANSI C++ Committee founded
  • 1991 ISO C++ Committee founded
  • 1992 STL implemented in C++
  • 1998 C++98 (ISO/IEC 14882:1998)
  1. New features: RTTI (dynamic_cast, typeid), covariant return types, cast operators, mutable, bool, declarations in conditions, template instantiations, member templates, export
  2. Library additions: locales, bitset, valarray, auto_ptr, templatized string, iostream, and complex.
  3. Based on STL: containers, algorithms, iterators, function objects
  • 1998 The C++ Programming Language, 3rd edition
  • 1999 Boost founded by the committee members to produce new high-quality candidate libraries for the standard.
  • 2003 C++03 (ISO/IEC 14882:2003)

This was a minor revision, intended to be little more than a technical corrigendum

  1. New features: value initialization
Defect Reports fixed in C++03 (92 core, 125 library)

This TR discussed the costs of various C++ abstractions, provided implementation guidance, discussed use of C++ in embedded systems and introduced <hardware> interface to C's ISO/IEC TR 18037:2008 <iohw.h>.

This TR is a C++ library extension, which adds the following to the C++ standard library:

  1. From Boost: Reference wrapper, Smart pointers, Member function, Result Of, Bind, Function, Type Traits, Random, Mathematical Special Functions, Tuple, Array, Unordered Containers (including Hash), and Regular Expressions.
  2. From C99: mathematical functions from math.h that were new in C99, blank character class, Floating-point environment, hexfloat I/O Manipulator, fixed-size integral types, the long long type, va_copy, the snprintf() and vfscanf() families of functions, and the C99 conversion specifies for printf() and scanf() families of functions.

All of TR1 except for the special functions was included in C++11, with minor changes.

This international standard is a C++ standard library extension, which adds the special functions that were part of TR1, but were not included in C++11: elliptic integrals, exponential integral, Laguerre polynomials, Legendre polynomials, Hermite polynomials, Bessel functions, Neumann functions, beta function, and Riemann zeta function. This standard was merged into C++17.

A large number of changes were introduced to both standardize existing practices and improve the abstractions available to the C++ programmers

  1. From TR1: all of TR1 except Special Functions.
  2. From Boost: The thread library, exception_ptr, error_code and error_condition, iterator improvements (std::begin, std::end, std::next, std::prev)
  3. From C: C-style Unicode conversion functions

More changes in C++11

Defect Reports fixed in C++11 (741 core, 868 library)
  1. 1.0 1.1 1.2 The reslution of these defects added the following member functions, but they are not available in the C++98 mode of libstdc++:

This TR implements the decimal floating-point types from IEEE 754-2008 Standard for Floating-Point Arithmetic: std::decimal::decimal32, std::decimal::decimal64, and std::decimal::decimal128.

Minor revision of the C++ standard

  1. New language features: variable templates, polymorphic lambdas, lambda captures expressions, new/delete elision, relaxed restrictions on constexpr functions, binary literals, digit separators, return type deduction for functions, aggregate initialization for classes with brace-or-equal initializers.
  2. New library features: std::make_unique, std::shared_timed_mutex and std::shared_lock, std::integer_sequence, std::exchange, std::quoted, and many small improvements to existing library facilities, such as two-range overloads for some algorithms, type alias versions of type traits, user-defined string, duration, and complex number literals, etc.
Defect Reports fixed in C++14 (276 core, 158 library)

This TS is an experimental C++ library extension that specifies a filesystem library based on boost.filesystem V3 (with some modifications and extensions). This TS was merged into C++17.

This TS standardizes parallel and vector-parallel API for all standard library algorithms, as well as adds new algorithms such as reduce, transform_reduce, or exclusive_scan. This TS was merged into C++17.

This TS extends the C++ core language with synchronized and atomic blocks, as well as transaction-safe functions, which implement transactional memory semantics.

This TS adds several new components to the C++ standard library: optional, any, string_view, sample, search, apply, polymorphic allocators, and variable templates for type traits. This TS was merged into C++17.

This TS extends the C++ core language with concepts (named type requirements) and constraints (limits on the types allowed in template, function, and variable declarations), which aids metaprogramming and simplifies template instantiation diagnostics, see concepts. This TS was merged into C++20, with some omissions.

This TS extends the C++ library to include several extensions to std::future, latches and barriers, and atomic smart pointers.

  1. From TS's: the filesystem library, the library fundamentals v1 (including optional, any, string_view, polymorphic allocators, searchers, apply), parallelism v1 (including execution policies, reduce, inclusive_scan, exclusive_scan), but removing exception_list. From special function IS: mathematical special functions, from library fundamentals v2: std::gcd, std::lcm
  2. From C11: std::aligned_alloc, std::timespec_get
Defect Reports fixed in C++17 (290 core, 363 library)

This TS extends the C++ library to include ranges, a new, more powerful, abstraction to replace iterator pairs, along with range views, sentinel ranges, projections for on-the-fly transformations, new iterator adaptors and algorithms. This extension finally makes it possible to sort a vector with sort(v);

This TS extends the C++ core language and the standard library to include stackless coroutines (resumable functions). This adds the keywords co_await, co_yield, and co_return.

This TS extends the C++ library to include TCP/IP networking based on boost.asio.

This TS extends the C++ core language to include modules. This adds the keywords module, import, and reintroduces the keyword export with a new meaning.

  • 2018 Extensions for Parallelism version 2 TS (ISO/IEC TS 19570:2018) (ISO Store) (draft)

This TS extends the C++ library to include two new execution policies (unseq and vec), additional parallel algorithms such as reduction_plus or for_loop_strided, task blocks for forking and joining parallel tasks, SIMD types and operations on those types.

More changes in C++17

Future development

The next major revision of the C++ standard

  1. From TS's: Coroutines, Modules, Concepts, abbreviated function templates,
  2. From TS's: Ranges, uniform container erasure (std::erase/std::erase_if)

More changes in C++20

See also

C documentation for History of C

External links