下表为各个编译器对新的 C++ 功能特性的支持情况。这些功能特性包括 C++11 、 C++14 、 C++17 和之后接受的标准版本 (C++20/C++2a) ,还有几个技术规范的内容。
注意,此列表可能根据 C++2a 标准草案的演化而更改。
C++2a 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
[折叠] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
允许 lambda 捕获 [=, this] |
P0409R2 | c++2a-lang | 8 | 6 | 5.1 | ||||||||
__VA_OPT__ |
P0306R4 | c++2a-lang | 8 (部分)* | 6 | 5.1 |
|
|||||||
指派初始化器 | P0329R4 | c++2a-lang | 4.7 (部分)* 8 |
3.0 (部分)* | 5.1 |
|
|||||||
泛型 lambda 的模板形参列表 | P0428R2 | c++2a-lang | 8 | 5.1 |
|
||||||||
位域的默认成员初始化器 | P0683R1 | c++2a-lang | 8 | 6 | 5.1 |
|
|||||||
类模板实参推导中的 initializer_list 构造函数 | P0702R1 | c++2a-lang | 8 | 6 | 19.14* | 5.0 |
|
||||||
const& 限定的成员指针 | P0704R1 | c++2a-lang | 8 | 6 | 5.1 |
|
|||||||
概念 (concept) | P0734R0 | c++2a-lang | 6 (仅 TS) |
||||||||||
不求值语境中的 lambda | P0315R4 | c++2a-lang | 9 |
|
|||||||||
三路比较运算符 | P0515R3 | c++2a-lang | 8 (部分)* | 19.20* |
|
||||||||
简化隐式 lambda 捕获 | P0588R1 | c++2a-lang | 8 |
|
|||||||||
基于范围的 for 的初始化语句 | P0614R1 | c++2a-lang | 9 | 8 |
|
||||||||
可默认构造且可赋值的无状态 lambda | P0624R2 | c++2a-lang | 9 | 8 | 5.1 |
|
|||||||
与预置的复制构造函数的 const 不匹配 | P0641R2 | c++2a-lang | 9 | 8 | 5.1 |
|
|||||||
特化上的访问检查 | P0692R1 | c++2a-lang | 是 | 8 (部分)* |
|
||||||||
ADL 与不可见的函数模板 | P0846R0 | c++2a-lang | 9 |
|
|||||||||
令 constexpr 函数的实例化较不贪婪 | P0859R0 | c++2a-lang | 5.2 (部分)* 9 |
||||||||||
属性 [[likely]] 与 [[unlikely]] |
P0479R5 | c++2a-lang | 9 | 5.1 |
|
||||||||
使 typename 更可选 |
P0634R3 | c++2a-lang | 9 |
|
|||||||||
Lambda 初始化捕获中的包展开 | P0780R2 | c++2a-lang | 9 |
|
|||||||||
属性 [[no_unique_address]] |
P0840R2 | c++2a-lang | 9 | 5.1 | |||||||||
契约 | P0542R5 | c++2a-lang |
|
||||||||||
销毁的 operator delete | P0722R3 | c++2a-lang | 9 | 6 |
|
||||||||
非类型模板形参中的类类型 | P0732R2 | c++2a-lang | 9 |
|
|||||||||
explicit(bool) | P0892R2 | c++2a-lang | 9 | 5.1 |
|
||||||||
整合功能特性测试宏 | P0941R2 | c++2a-lang | 5 | 3.4 | 19.15* | 5.0 |
|
||||||
禁止聚合体有用户声明的构造函数 | P1008R1 | c++2a-lang | 9 | 8 | 5.1 |
|
|||||||
constexpr 虚函数 | P1064R0 | c++2a-lang | 9 | 5.1 | |||||||||
char8_t |
P0482R6 | c++2a-lang | 9 | 7 |
|
||||||||
std::is_constant_evaluated() | P0595R2 | c++2a-lang | 9 |
|
|||||||||
constexpr try -catch 代码块 |
P1002R1 | c++2a-lang | 9 | 8 | 5.1 |
|
|||||||
立即函数 | P1073R3 | c++2a-lang | 5.1 |
|
|||||||||
嵌套内联命名空间 | P1094R2 | c++2a-lang | 9 | 8 | 5.1 |
|
|||||||
constexpr 的 dynamic_cast 和多态 typeid |
P1327R1 | c++2a-lang | 5.1 |
|
|||||||||
在 constexpr 中改变联合体的活跃成员 | P1330R0 | c++2a-lang | 9 | 5.1 | |||||||||
结构化绑定的扩展 | P1091R3 P1381R1 |
c++2a-lang |
|
||||||||||
更强的 Unicode 要求 | P1041R4 P1139R2 |
c++2a-lang | 是 |
|
|||||||||
参数化的聚合体初始化 | P0960R3 | c++2a-lang |
|
||||||||||
模块 (module) | P1103R3 | c++2a-lang | 8 (部分) |
|
|||||||||
协程 (coroutine) | P0912R5 | c++2a-lang | 8 (部分) |
|
|||||||||
std::endian | P0463R1 | c++2a | 8 | 7 | N/A |
|
|||||||
std::remove_cvref | P0550R2 | c++2a | 9 | 6 | 19.20* | N/A |
|
||||||
扩展 std::make_shared 以支持数组 | P0674R1 | c++2a | N/A | ||||||||||
原子性浮点算术 | P0020R6 | c++2a | N/A |
|
|||||||||
同步缓冲的 ostream | P0053R7 | c++2a | N/A |
|
|||||||||
constexpr |
P0202R3 | c++2a | 8 | N/A |
|
||||||||
constexpr |
P0415R1 | c++2a | 9 | N/A |
|
||||||||
字符串前缀与后缀检查 | P0457R2 | c++2a | 9 | 6 | N/A |
|
|||||||
operator<=> 的库支持 |
P0515R3 | c++2a | 7 | 19.20* | N/A |
|
|||||||
转换指针为裸指针的工具 | P0653R2 | c++2a | 8 | 6 | N/A |
|
|||||||
原子性的 shared_ptr 与 weak_ptr | P0718R2 | c++2a | N/A | ||||||||||
std::span | P0122R7 | c++2a | 7 | N/A |
|
||||||||
日历与时区 | P0355R7 | c++2a | 7 | N/A |
|
||||||||
P0754R2 | c++2a | 9 | 7 | N/A | |||||||||
std::atomic_ref | P0019R8 | c++2a | N/A |
|
|||||||||
整数的 2 的幂的运算 | P0556R3 | c++2a | 9 | N/A |
|
||||||||
std::bit_cast() | P0476R2 | c++2a | N/A |
|
|||||||||
std::destroying_delete | P0722R3 | c++2a | 9 | N/A |
|
||||||||
概念库 | P0898R3 | c++2a | N/A | ||||||||||
一致的容器擦除 | P1209R0 | c++2a | 9 | 8 | N/A | ||||||||
C++2a 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
C++17 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
[折叠] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
直接列表初始化的新 auto 规则 | N3922 | c++17-lang | 5 | 3.8 | 19.0* | 4.10.1 | 17.0 | 17.7 | |||||
无消息的 static_assert | N3928 | c++17-lang | 6 | 2.5 | 19.10* | 4.12 | 18.0 | 17.7 | |||||
模板模板形参中的 typename |
N4051 | c++17-lang | 5 | 3.5 | 19.0* | 4.10.1 | 17.0 | 17.7 | |||||
移除三标符 | N4086 | c++17-lang | 5 | 3.5 | 16.0* | 5.0 | |||||||
嵌套命名空间定义 | N4230 | c++17-lang | 6 | 3.6 | 19.0* | 4.12 | 17.0 | 17.7 | |||||
命名空间和枚举项的属性 | N4266 | c++17-lang | 4.9 (命名空间) / 6 (枚举项) | 3.6 | 19.0* | 4.11 | 17.0 | 17.7 | |||||
u8 字符字面量 |
N4267 | c++17-lang | 6 | 3.6 | 19.0* | 4.11 | 17.0 | 17.7 | |||||
允许所有非类型模板实参的常量求值 | N4268 | c++17-lang | 6 | 3.6 | 19.12* | 5.0 | |||||||
折叠表达式 | N4295 | c++17-lang | 6 | 3.6 | 19.12* | 4.14 | 19.0 | 18.1 | |||||
移除 register 关键字的已弃用用法 | P0001R1 | c++17-lang | 7 | 3.8 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
移除已弃用的 operator++(bool) | P0002R1 | c++17-lang | 7 | 3.8 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
从 C++17 移除已弃用的异常规定 | P0003R5 | c++17-lang | 7 | 4 | 19.10* | 4.14 | 19.0 | ||||||
令异常规定为类型系统的一部分 | P0012R1 | c++17-lang | 7 | 4 | 19.12* | 4.14 | 19.0 | ||||||
有基类的类的聚合初始化 | P0017R1 | c++17-lang | 7 | 3.9 | 19.14* | 5.0 | |||||||
*this 的 lambda 捕获 |
P0018R3 | c++17-lang | 7 | 3.9 | 19.11* | 4.14 | 19.0 | 18.1 | |||||
使用属性命名空间而不重复 | P0028R4 | c++17-lang | 7 | 3.9 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
过对齐数据的动态内存分配 | P0035R4 | c++17-lang | 7 | 4 | 19.12* | 4.14 | |||||||
一元折叠表达式和空形参包 | P0036R0 | c++17-lang | 6 | 3.9 | 19.12* | 4.14 | |||||||
预处理器条件中的 __has_include | P0061R1 | c++17-lang | 5 | 是 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
类模板实参推导 | P0091R3 | c++17-lang | 7 | 5 | 19.14* | 5.0 | 19.1 | ||||||
具有 auto 类型的非类型模板形参 |
P0127R2 | c++17-lang | 7 | 4 | 19.14* | 5.0 | 19.1 | ||||||
有保证的复制消除 | P0135R1 | c++17-lang | 7 | 4 | 19.13* | 5.0 | 19.1 | ||||||
继承构造函数的新规定 (DR1941 等) | P0136R1 | c++17-lang | 7 | 3.9 | 19.14* | ||||||||
替换含引用成员的类对象 | P0137R1 | c++17-lang | 7 | 6 | 19.14* | 5.0 | |||||||
枚举的直接列表初始化 | P0138R2 | c++17-lang | 7 | 3.9 | 19.11* | 4.14 | 18.0 | ||||||
更严格的表达式求值顺序 | P0145R3 | c++17-lang | 7 | 4 | 19.14* | 5.0 | |||||||
constexpr lambda 表达式 | P0170R1 | c++17-lang | 7 | 5 | 19.11* | 4.14 | 19.0 | 18.1 | |||||
基于范围 for 的相异 begin 和 end 类型 | P0184R0 | c++17-lang | 6 | 3.9 | 19.10* | 4.12 | 18.0 | 17.7 | |||||
[[fallthrough]] 属性 |
P0188R1 | c++17-lang | 7 | 3.9 | 19.10* | 4.13 | 18.0 | 17.7 | |||||
[[nodiscard]] 属性 |
P0189R1 | c++17-lang | 7 | 3.9 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
using 声明中的包展开 | P0195R2 | c++17-lang | 7 | 4 | 19.14* | 5.0 | |||||||
[[maybe_unused]] 属性 |
P0212R1 | c++17-lang | 7 | 3.9 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
结构化绑定 | P0217R3 | c++17-lang | 7 | 4 | 19.11* | 4.14 | 19.0 | 18.1 | |||||
十六进制浮点字面量 | P0245R1 | c++17-lang | 3.0 | 是 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
忽略未知属性 | P0283R2 | c++17-lang | 是 | 3.9 | 19.11* | 4.13 | 18.0 | 17.7 | |||||
constexpr if 语句 | P0292R2 | c++17-lang | 7 | 3.9 | 19.11* | 4.14 | 19.0 | 18.1 | |||||
if 和 switch 的初始化语句 | P0305R1 | c++17-lang | 7 | 3.9 | 19.11* | 4.14 | 18.0 | 18.1 | |||||
内联变量 | P0386R2 | c++17-lang | 7 | 3.9* | 19.12* | 4.14 | 19.0 | 18.1 | |||||
DR :模板模板实参的匹配排除了兼容的模板 | P0522R0 | c++17-lang | 7 | 4 | 19.12* | 5.0 | |||||||
std::uncaught_exceptions | N4259 | c++17 | 6 | 3.7 | 19.0* | N/A | N/A | N/A | |||||
改进 std::pair 和 std::tuple | N4387 | c++17 | 6 | 4 | 19.0* | N/A | N/A | N/A | |||||
std::any | P0220R1 | c++17 | 7 | 4 | 19.10* | N/A | N/A | N/A | |||||
std::variant | P0088R3 | c++17 | 7 | 4 | 19.10* | N/A | N/A | N/A | |||||
std::optional | P0220R1 | c++17 | 7 | 4 | 19.10* | N/A | N/A | N/A | |||||
std::shared_mutex (无时限) | N4508 | c++17 | 6 | 3.7 | 19.0* | N/A | N/A | N/A | |||||
std::string_view | N3921 | c++17 | 7 | 4 | 19.10* | N/A | N/A | N/A | |||||
并行 TS 的标准化 | P0024R2 | c++17 | 19.14* (部分) |
N/A | 18.0* | N/A | |||||||
C++17 应当指代 C11 而不是 C99 | P0063R3 | c++17 | 9 | 7 | 19.0* (部分)* |
N/A | N/A | N/A | |||||
初等字符串转换 | P0067R5 | c++17 | 8 (无浮点) | 19.14*(无浮点) 19.15* |
N/A | N/A | N/A | ||||||
数学特殊函数 | P0226R1 | c++17 | 7 | 19.14* | N/A | N/A | N/A | ||||||
接合 map 和 set | P0083R3 | c++17 | 7 | 8 | 19.12* | N/A | N/A | N/A | |||||
硬件干涉大小 | P0154R1 | c++17 | 19.11* | N/A | N/A | N/A | |||||||
std::filesystem | P0218R1 | c++17 | 8 | 7 | 19.14* | N/A | N/A | N/A | |||||
std::byte | P0298R3 | c++17 | 7 | 5 | 19.11* | N/A | N/A | N/A | |||||
C++17 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
C++14 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
[折叠] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
按语境转换的遣词调整 | N3323 | c++14-lang | 4.9 | 3.4 | 18.0* | 4.9 | 16.0 | 13.1.2* | 5.15 | 8.6 | 16.1 | ||
二进制字面量 | N3472 | c++14-lang | 4.3/4.9 | 2.9 | 19.0* | 4.10 | 11.0 | 13.1.2* | 5.14 | 8.6 | 2015 | ||
decltype(auto) ,普通函数的返回类型推导 | N3638 | c++14-lang | 4.8/4.9 | 3.3/3.4 | 19.0* | 4.9 | 15.0 | 13.1.2* | 5.15 | 8.6 | 16.1 | ||
带初始化/泛化的 lambda 捕获 (init-capture) | N3648 | c++14-lang | 4.5/4.9 | 3.4 | 19.0* | 4.10 | 15.0 | 5.15 | 8.6 | 16.1 | |||
泛型(多态) lambda 表达式 | N3649 | c++14-lang | 4.9 | 3.4 | 19.0* | 4.10 | 16.0 | 13.1.2* | 5.15 | 8.6 | 16.1 | ||
变量模板 | N3651 | c++14-lang | 5 | 3.4 | 19.0* | 4.11 | 17.0 | 13.1.2* | 5.15 | 8.6 | 17.4 | ||
扩展的 constexpr | N3652 | c++14-lang | 5 | 3.4 | 19.10* | 4.11 | 17.0 | 13.1.2* | 5.15 | 8.6 | 17.4 | ||
成员初始化器与聚合体 (NSDMI) | N3653 | c++14-lang | 5 | 3.3 | 19.10* | 4.9 | 16.0 | 5.14 | 8.6 | 16.1 | |||
澄清内存分配(分配的免除/融合) | N3664 | c++14-lang | N/A | 3.4 | N/A | N/A | N/A | 8.6 | 17.4 | ||||
[[deprecated]] 属性 |
N3760 | c++14-lang | 4.9 | 3.4 | 19.0* | 4.9 | 15.0* 16.0 |
13.1.2* | 5.14 | 8.6 | 16.1 | ||
具大小解分配 | N3778 | c++14-lang | 5 | 3.4 | 19.0* | 4.10.1 | 17.0 | 5.14 | 8.6 | 16.1 | |||
单引号作为数位分隔符 | N3781 | c++14-lang | 4.9 | 3.4 | 19.0* | 4.10 | 16.0 | 13.1.2* | 5.14 | 8.6 | 2015 | ||
std::result_of 与 SFINAE | N3462 | c++14 | 5 | 是 | 19.0* | N/A | N/A | 5.15 | 是 | 8.6 | N/A | ||
constexpr |
N3302 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
constexpr |
N3469 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
constexpr |
N3470 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
constexpr |
N3471 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
改进的 std::integral_constant | N3545 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
N3642 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | ||||
空向前迭代器 | N3644 | c++14 | 5* | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
std::quoted | N3654 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
异质关联查找 | N3657 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
std::integer_sequence | N3658 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
std::shared_timed_mutex | N3659 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
std::exchange | N3668 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
修正无 const 的 constexpr 成员函数 |
N3669 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
std::get |
N3670 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
双范围的 std::equal 、 std::is_permutation 、 std::mismatch | N3671 | c++14 | 5 | 3.4 | 19.0* | N/A | N/A | 5.15 | 8.6 | N/A | |||
C++14 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
C++11 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
HP aCC |
Digital Mars C++ |
[折叠] |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
alignas | N2341 | c++11 | 4.8 | 3.0 | 19.0* | 4.8 | 15.0 | 13.1.2* | 5.13 | 是 | 8.6 | 2015 | |||
alignof | N2341 | c++11 | 4.5 | 2.9 | 19.0* | 4.8 | 15.0 | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | |||
原子操作 | N2427 | c++11 | 4.4 | 3.1 | 17.0* | Yes | 13.0 | 13.1.2* | 5.14 | 是 | 8.4 | 2015 | |||
auto | N1984(v1.0) | c++11 | 4.4(v1.0) | 是 | 16.0* | 3.9 | 11.0(v0.9) 12.0(v1.0) |
11.1(v1.0) | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
C99 预处理器 | N1653 | c++11 | 4.3 | 是 | 19.0* (部分:变参宏有漏洞) |
4.1 | 11.1 | 10.1 | 5.9 | 是 | 8.4 | 2015 | A.06.25 | 是 | |
constexpr | N2235 | c++11 | 4.6 | 3.1 | 19.0* (部分) |
4.6 | 13.0* 14.0 |
12.1* 13.1 |
5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
decltype | v1.0: N2343 v1.1: N3276 |
c++11 | 4.3(v1.0) 4.8.1(v1.1) |
2.9 | 16.0* | 4.2(v1.0) 4.8(v1.1) |
11.0(v1.0) 12.0(v1.1) |
11.1(v1.0) | 5.13 | 是 | 8.4 | 2015 | A.06.25 | 8.52(v1.0) | |
预置和弃置的函数 | N2346 | c++11 | 4.4 | 3.0 | 18.0* | 4.1 | 12.0 | 13.1 | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
委托构造函数 | N1986 | c++11 | 4.7 | 3.0 | 18.0* | 4.7 | 14.0 | 11.1 | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
显式转换运算符 | N2437 | c++11 | 4.5 | 3.0 | 18.0* | 4.4 | 13.0 | 12.1 | 5.13 | 是 | 8.4 | 2015 | A.06.27 | ||
扩展的 friend 声明 | N1791 | c++11 | 4.7 | 2.9 | 16.0* (部分) 18.0* |
4.1 | 11.1* 12.0 |
11.1 | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
extern template | N1987 | c++11 | 3.3 | 是 | 12.0* | 3.9 | 9.0 | 11.1 | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
前置 enum 声明 | N2764 | c++11 | 4.6 | 3.1 | 17.0* | 4.5 | 11.1* 14.0 |
12.1 | 5.13 | 是 | 8.4 | 2015 | |||
继承的构造函数 | N2540 | c++11 | 4.8 | 3.3 | 19.0* | 4.8 | 15.0 | 13.1.1* | 5.13 | 是 | 8.4 | 2015 | |||
初始化器列表 | N2672 | c++11 | 4.4 | 3.1 | 18.0* | 4.5 | 13.0* 14.0 |
13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
Lambda 表达式 | v0.9: N2550 v1.0: N2658 |
c++11 | 4.5(v1.1) | 3.1 | 16.0*(v1.0) 17.0*(v1.1) |
4.1(v1.1) | 12.0(v1.1) | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
局部及无名类型作为模板形参 | N2657 | c++11 | 4.5 | 2.9 | 16.0* | 4.2 | 12.0 | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.27 | ||
long long | N1811 | c++11 | 是 | 是 | 14.0* | 是 | 是 | 是 | 是 | 是 | 8.4 | 2015 | 是 | 是 | |
内联命名空间 | N2535 | c++11 | 4.4 | 2.9 | 19.0* | 4.5 | 14.0 | 11.1 | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
新字符类型 | N2249 | c++11 | 4.4 | 2.9 | 19.0* | 4.4 | 12.1* 14.0 |
13.1.1* | 5.13 | 是 | 8.4 | 2015 | A.06.27 | 8.52 | |
尾随的函数返回类型 | N2541 | c++11 | 4.4 | 2.9 | 16.0* | 4.1 | 12.0 | 12.1 | 5.13 | 是 | 8.4 | 2015 | A.06.27 | ||
nullptr | N2431 | c++11 | 4.6 | 2.9 | 16.0* | 4.2 | 12.1 | 13.1 | 5.13 | 是 | 8.4 | 2015 | A.06.27 | 8.52 | |
Unicode 字符串字面量 | N2442 | c++11 | 4.4 | 3.0 | 19.0* | 4.7 | 11.0* | 10.1* 13.1.1* |
5.7 | 是 | 8.4 | 2015 | A.06.28 | 8.52 | |
原始字符串字面量 | N2442 | c++11 | 4.5 | 是 | 18.0* | 4.7 | 14.0 | 13.1.1* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | 8.52 | |
用户定义字面量 | N2765 | c++11 | 4.7 | 3.1 | 19.0* | 4.8 | 15.0 | 13.1.2* | 5.14 | 是 | 8.4 | 2015 | |||
右角括号 | N1757 | c++11 | 4.3 | 是 | 14.0* | 4.1 | 11.0 | 12.1 | 5.13 | 是 | 8.4 | 2015 | |||
右值引用 | v1.0: N2118 v2.0: N2844 |
c++11 | 4.3(v1.0) 4.5(v2.1) 4.6(v3.0) |
是 | 16.0*(v2.0) 17.0*(v2.1) 19.0*(v3.0) |
4.5(v3.0) | 11.1(v1.0) 12.0(v2.0) 14.0(v3.0) |
12.1(v2.1) | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
static_assert | N1720 | c++11 | 4.3 | 2.9 | 16.0* | 4.1 | 11.0 | 11.1 | 5.13 | 是 | 8.4 | 2015 | A.06.25 | 8.52 | |
强类型 enum | N2347 | c++11 | 4.4 | 2.9 | 17.0* | 4.0 | 13.0 | 12.1 | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
模板别名 | N2258 | c++11 | 4.7 | 3.0 | 18.0* | 4.2 | 12.1 | 13.1.1* | 5.13 | 是 | 8.4 | 2015 | A.06.27 | ||
线程局域存储 | N2659 | c++11 | 4.4* 4.8 |
3.3* 3.3 |
16.0* (部分) 19.0* |
4.8 | 11.1* 15.0* |
10.1* 13.1.2* |
5.9* | 是 | 8.4 | 2015 | 8.52* | ||
无限制的联合体 | N2544 | c++11 | 4.6 | 3.0 | 19.0* | 4.6 | 14.0* | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
类型特征 | N1836 | c++11 | 4.3 | 3.0 | 14.0* | 4.0 | 10.0 | 13.1.3 | 5.13 | 是 | 8.4 | 2015 | 6.16 | ||
变参模板 | v0.9: N2242 v1.0: N2555 |
c++11 | 4.3(v0.9) 4.4(v1.0) |
2.9(v1.0) | 18.0* | 4.3(v0.9) 4.3(v1.0) |
12.1(v1.0) | 11.1(v0.9) | 5.13 | 是 | 8.4 | 2015 | A.06.27 | ||
范围 for 循环 | N2930 | c++11 | 4.6 | 3.0 | 17.0* | 4.5 | 13.0 | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
override 与 final | v0.8: N2928 v0.9: N3206 |
c++11 | 4.7 | 2.9 | 14.0* (部分) 17.0* |
4.8(v1.0) | 12.0(v0.8) 14.0(v1.0) |
13.1.1* | 5.13 | 是 | 8.4 | 2015 | |||
属性 | N2761 | c++11 | 4.8 | 3.3 | 19.0* | 4.2 | 12.1 | 13.1.1* | 5.13 | 是 | 8.4 | 2015 | A.06.27 | ||
引用限定符 | N2439 | c++11 | 4.8.1 | 2.9 | 19.0* | 4.7 | 14.0 | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
非静态数据成员初始化器 | N2756 | c++11 | 4.7 | 3.0 | 18.0* | 4.6 | 14.0 | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
有并发的动态初始化及析构(魔法静态变量) | N2660 | c++11 | 4.3 | 2.9 | 19.0* | 是 | 11.1* | 13.1.2* | 5.13 | 是 | 8.4 | 2015 | A.06.25 | ||
noexcept | N3050 | c++11 | 4.6 | 3.0 | 19.0* | 4.5 | 14.0 | 13.1.1* | 5.13 | 是 | 8.4 | 2015 | A.06.28 | ||
垃圾收集与基于可达性的泄漏检测 | N2670 | c++11 | |||||||||||||
垃圾收集与基于可达性的泄漏检测(库支持) | N2670 | c++11 | 6 (无操作) |
3.4 (无操作) |
19.0* (无操作) |
N/A | N/A | N/A | |||||||
金额、时间及十六进制浮点 I/O 操纵符 | 时间: N2071 金额: N2072 |
c++11 | 5 | 3.8 | 19.0* | N/A | N/A | 5.15 | N/A | ||||||
C++11 功能特性 |
提案 |
版本 |
GCC |
Clang |
MSVC |
EDG eccp |
Intel C++ |
IBM XLC++ |
Sun/Oracle C++ |
Embarcadero C++ Builder |
Cray |
Portland Group (PGI) |
HP aCC |
Digital Mars C++ |
引用
各编译器厂商的兼容性检查单文档(这些通常比以上表格更能反映最新的情况)
转载:https://zh.cppreference.com/w/cpp/compiler_support