第一章、语言标准
参考网站:cppreference.com
C++标准有 C++11,C++14,C++17,C++20,C++23,C++26
C 标准有 C89,C95,C99,C11,C17,C23
注意:相应的语言标准需要编译器支持。
第二章、关键字
C语言关键字 | |||
alignas (C23) | extern | sizeof | _Alignas (C11) |
alignof (C23) | false (C23) | static | _Alignof (C11) |
auto | float | static_assert (C23) | _Atomic (C11) |
bool (C23) | for | struct | _BitInt (C23) |
break | goto | switch | _Bool (C99) |
case | if | thread_local (C23) | _Complex (C99) |
char | inline (C99) | true (C23) | _Decimal128 (C23) |
const | int | typedef | _Decimal32 (C23) |
constexpr (C23) | long | typeof (C23) | _Decimal64 (C23) |
continue | nullptr (C23) | typeof_unqual (C23) | _Generic (C11) |
default | register | union | _Imaginary (C99) |
do | restrict (C99) | unsigned | _Noreturn (C11) |
double | return | void | _Static_assert (C11) |
else | short | volatile | _Thread_local (C11) |
enum | signed | while |
C++关键字 | ||
A – C | D – P | R – Z |
alignas (C++11) | decltype (C++11) | reflexpr (reflection TS) |
alignof (C++11) | default (1) | register (2) |
and | delete (1) | reinterpret_cast |
and_eq | do | requires (C++20) |
asm | double | return |
atomic_cancel (TM TS) | dynamic_cast | short |
atomic_commit (TM TS) | else | signed |
atomic_noexcept (TM TS) | enum (1) | sizeof (1) |
auto (1) (2) (3) (4) | explicit | static |
bitand | export (1) (3) | static_assert (C++11) |
bitor | extern (1) | static_cast |
bool | FALSE | struct (1) |
break | float | switch |
case | for (1) | synchronized (TM TS) |
catch | friend | template |
char | goto | this (4) |
char8_t (C++20) | if (2) (4) | thread_local (C++11) |
char16_t (C++11) | inline (1) | throw |
char32_t (C++11) | int | TRUE |
class (1) | long | try |
compl | mutable (1) | typedef |
concept (C++20) | namespace | typeid |
const | new | typename |
consteval (C++20) | noexcept (C++11) | union |
constexpr (C++11) | not | unsigned |
constinit (C++20) | not_eq | using (1) |
const_cast | nullptr (C++11) | virtual |
continue | operator (4) | void |
co_await (C++20) | or | volatile |
co_return (C++20) | or_eq | wchar_t |
co_yield (C++20) | private (3) | while |
protected | xor | |
public | xor_eq | |
(1) — meaning changed or new meaning added in C++11. | ||
(2) — meaning changed or new meaning added in C++17. | ||
(3) — meaning changed or new meaning added in C++20. | ||
(4) — new meaning added in C++23. |