命名空间 (Namespaces)
变体 (Variants)
视图 (Views)
操作 (Actions)

C++ 历史

来自 cppreference.cn
< cpp‎ | language
 
 
C++ 语言
通用主题
流程控制 (Flow control)
条件执行语句
if
迭代语句 (循环)
for
range-for (C++11)
跳转语句
函数 (Functions)
函数声明
Lambda 函数表达式
inline 说明符 (specifier)
动态异常规范 (Dynamic exception specifications) (直到 C++17* (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)
C++ 历史
 

目录 (Contents)

[编辑 (edit)] 早期 C++ (Early C++)

  • 1979: C with Classes 首次实现
  1. 新特性: 类 (classes), 成员函数 (member functions), 派生类 (derived classes), 分别编译, public 和 private 访问控制, 友元 (friends), 函数参数的类型检查, 默认参数 (default arguments), 内联函数 (inline functions), 重载赋值运算符 (overloaded assignment operator), 构造函数 (constructors), 析构函数 (destructors), f()f(void) 相同, 调用函数和返回函数 (同步特性,不在 C++ 中)
  2. 库: 并发任务库 (concurrent task library) (不在 C++ 中)
  • 1982: C with Classes 参考手册出版
  • 1984: C84 实现,参考手册出版
  • 1985: Cfront 1.0
  1. 新特性: 虚函数 (virtual functions), 函数和 运算符重载 (operator overloading), 引用 (references), newdelete 运算符, 关键字 const, 作用域解析运算符
  2. 库添加: 复数 (complex number), string (AT&T 版本), I/O 流 (I/O stream)
  • 1985: 《C++ 编程语言》第一版
  • 1986: 记录剩余设计目标的 “whatis?” 论文,包括多重继承、异常处理和模板。
  • 1987: GCC 1.15.3 中支持 C++
  • 1989: Cfront 2.0
  1. 新特性: 多重继承 (multiple inheritance), 指向成员的指针 (pointers to members), protected 访问, 类型安全链接, 抽象类 (abstract classes), staticconst 限定的成员函数 (const-qualified member functions), 类特定的 newdelete
  2. 库添加: I/O 操纵符 (I/O manipulators)
  • 1990: 《带注释的 C++ 参考手册》

本书描述了按设计语言,包括一些尚未实现的功能。在 ISO 标准之前,它充当了事实上的标准。

  1. 新特性: 命名空间 (namespaces), 异常处理 (exception handling), 嵌套类 (nested classes), 模板 (templates)
  • 1991: Cfront 3.0
  • 1991: 《C++ 编程语言》第二版

[编辑 (edit)] 标准 C++ (Standard C++)

  • 1990: ANSI C++ 委员会成立
  • 1991: ISO C++ 委员会成立
  • 1992: STL 在 C++ 中实现

[编辑 (edit)] C++98/03 时期 (period)

  • 1998: C++98 (ISO/IEC 14882:1998)
  1. 新特性: RTTI (dynamic_cast, typeid), 协变返回类型 (covariant return types), 转换运算符 (cast operators), mutable, bool, 条件声明, 模板实例化 (template instantiations), 成员模板 (member templates), export
  2. 库添加: locale, bitset, valarray, auto_ptr, 模板化字符串 (templatized string), I/O 流 (I/O streams), 和 复数 (complex numbers)
  3. 基于 STL: 容器 (containers), 算法 (algorithms), 迭代器 (iterators), 函数对象 (function objects)
  • 1998: 《C++ 编程语言》第三版
  • 1999: Boost 由委员会成员创立,旨在为标准生成新的高质量候选库。
  • 2003: C++03 (ISO/IEC 14882:2003)

这是一个小修订版,旨在仅仅是技术勘误。此修订版引入了 值初始化 (value initialization) 的定义。

C++03 中修复的缺陷报告 (Defect Reports fixed in C++03) (92 core, 125 library)

此 TR 讨论了各种 C++ 抽象的成本,提供了实现指南,讨论了 C++ 在嵌入式系统中的使用,并引入了 <hardware> 接口到 C 的 ISO/IEC TR 18037:2008 <iohw.h>

此 TR 是 C++ 库扩展,它将以下内容添加到 C++ 标准库

  1. 来自 Boost: reference_wrapper, 智能指针 (Smart pointers), 成员函数 (Member function), result_of, bind, function, 类型特征 (Type Traits), 随机数 (Random), 数学特殊函数 (Mathematical Special Functions), tuple, array, 无序容器 (Unordered Containers) (包括 hash), 和 正则表达式 (Regular Expressions)
  2. 来自 C99: 来自 <math.h> 的数学函数,这些函数在 C99 中是新的, 空白字符类 (blank character class), 浮点环境 (Floating-point environment), hexfloat I/O 操纵符 (Manipulator), 固定大小的整数类型 (fixed-size integral types), long long 类型, va_copy, snprintf()vfscanf() 函数族, 以及 printf()scanf() 函数族的 C99 转换说明符 (conversion specifies)。

TR1 的所有内容(特殊函数除外)都包含在 C++11 中,但有细微的变化。

  • 2010: 数学特殊函数 (Mathematical special functions) (ISO/IEC 29124:2010) (ISO Store) (2010 draft)

此国际标准是 C++ 标准库扩展,它添加了 TR1 的特殊函数,但未包含在 C++11 中:椭圆积分、指数积分、拉盖尔多项式、勒让德多项式、埃尔米特多项式、贝塞尔函数、诺依曼函数、贝塔函数和黎曼 zeta 函数。此标准已合并到 C++17 中

[编辑 (edit)] C++11 时期 (period)

主要文章: C++11

对 C++ 程序员可用的抽象进行了大量更改,以标准化现有实践并改进抽象

此 TR 实现了 IEEE 754-2008 浮点运算标准中的十进制浮点类型:std::decimal::decimal32std::decimal::decimal64std::decimal::decimal128

[编辑 (edit)] C++14 时期 (period)

主要文章: C++14

C++ 标准的小修订版

  • 2015: 文件系统库 TS (Filesystem library TS) (ISO/IEC TS 18822:2015) (ISO Store) (2014 draft)

此 TS 是一个实验性的 C++ 库扩展,它指定了基于 boost.filesystem V3 (进行了一些修改和扩展) 的文件系统库。此 TS 已合并到 C++17 中。

  • 2015: 并行扩展 TS (Extensions for Parallelism TS) (ISO/IEC TS 19570:2015) (ISO Store) (2015 draft)

此 TS 标准化了所有标准库算法的并行和向量并行 API,并添加了新算法,例如 reducetransform_reduceexclusive_scan。此 TS 已合并到 C++17 中。

  • 2015: 事务内存扩展 TS (Extensions for Transactional Memory TS) (ISO/IEC TS 19841:2015) (ISO Store) ([2015 draft)

此 TS 使用同步和原子块以及事务安全函数扩展了 C++ 核心语言,这些函数实现了事务内存语义。

  • 2015: 库基础扩展 TS (Extensions for Library Fundamentals TS) (ISO/IEC TS 19568:2015) (ISO Store) (2015 draft)

此 TS 向 C++ 标准库添加了几个新组件: optional, any, string_view, sample, search, apply, 多态分配器 (polymorphic allocators), 和 类型特征的变量模板 (variable templates for type traits)。此 TS 已合并到 C++17 中。

  • 2015: 概念扩展 TS (Extensions for Concepts TS) (ISO/IEC TS 19217:2015) (ISO Store) (2015 draft)

此 TS 使用概念 (命名类型要求) 和约束 (对模板、函数和变量声明中允许的类型的限制) 扩展了 C++ 核心语言,这有助于元编程并简化模板实例化诊断,请参阅 concepts。此 TS 已合并到 C++20 中,但省略了一些内容。

  • 2016: 并发扩展 TS (Extensions for Concurrency TS) (ISO/IEC TS 19571:2016) (ISO Store) (2015 draft)

此 TS 扩展了 C++ 库,以包括 std::futurelatchesbarriers 的几个扩展,以及原子智能指针 (atomic smart pointers)。

[编辑 (edit)] C++17 时期 (period)

主要文章: C++17

C++11 之后 C++ 标准的主要修订版

  • 2017: 范围扩展 TS (Extensions for Ranges TS) (ISO/IEC TS 21425:2017) (ISO Store) (2017 draft)

此 TS 扩展了 C++ 库以包含 ranges,这是一个新的、更强大的抽象来替代迭代器对,以及范围视图 (range views)、哨兵范围 (sentinel ranges)、用于即时转换的投影 (projections)、新的迭代器适配器和算法。此扩展最终使使用 sort(v); 对向量进行排序成为可能

  • 2017: 协程扩展 TS (Extensions for Coroutines TS) (ISO/IEC TS 22277:2017) (ISO Store) (2017 draft)

此 TS 扩展了 C++ 核心语言和标准库,以包含无栈协程 (stackless coroutines) (可恢复的函数)。这添加了关键字 co_await, co_yield, 和 co_return

  • 2018: 网络扩展 TS (Extensions for Networking TS) (ISO/IEC TS 19216:2018) (ISO Store) (2017 draft)

此 TS 扩展了 C++ 库,以包含基于 boost.asio 的 TCP/IP 网络。

  • 2018: 模块扩展 TS (Extensions for modules TS) (ISO/IEC TS 21544:2018) (ISO Store) (2018 draft)

此 TS 扩展了 C++ 核心语言以包含模块。这添加了特殊标识符 module, import, 并使用新的含义重新引入了关键字 export

  • 2018: 并行扩展版本 2 TS (Extensions for Parallelism version 2 TS) (ISO/IEC TS 19570:2018) (ISO Store) (2018 draft)

此 TS 扩展了 C++ 库,以包括两个新的执行策略 (unseqvec)、其他并行算法(例如 reduction_plusfor_loop_strided)、用于 fork 和 join 并行任务的任务块、SIMD 类型以及对这些类型的操作。

[编辑 (edit)] C++20 时期 (period)

主要文章: C++20

C++17 之后 C++ 标准的主要修订版

此 TS 使用检查程序实体 (例如变量、枚举、类及其成员、lambda 及其捕获等) 的工具扩展了 C++。

[编辑 (edit)] 未来发展 (Future development)

主要文章: C++23

C++ 标准的下一个主要修订版

[编辑 (edit)] 参见 (See also)

C 文档 (C documentation) 用于 C 历史 (History of C)

[编辑 (edit)] 外部链接 (External links)

1.  C++ 历史: 1979-1991 (A History of C++: 1979-1991)
2.  在真实世界中发展一种语言:C++ 1991-2006 (Evolving a language in and for the real world: C++ 1991-2006)
3.  在拥挤和变化的世界中蓬勃发展:C++ 2006-2020 (Thriving in a crowded and changing world: C++ 2006-2020)
4.  标准 C++ 基金会 (Standard C++ foundation)
5.  维基百科上的 C++ (C++ on Wikipedia)
6.  C++ 标准委员会 (C++ Standards Committee)