这是C++中保留的关键字的清单。由于这些关键字被语言使用,程序员不能将其重定义(或重载)。
and | default1 | noexcept2 | template |
and_eq | delete1 | not | this |
alignof2 | double | not_eq | thread_local2 |
asm | dynamic_cast | nullptr2 | throw |
auto1 | else | operator | true |
bitand | enum | or | try |
bitor| explicit /todo | or_eq | typedef |
bool | export | private | typeid |
break | extern /todo | protected | typename |
case | false | public | union |
catch | float | register | using1 |
char | for | reinterpret_cast | unsigned |
char16_t2 | friend | return | void |
char32_t2 | goto | short | wchar_t |
class | if | signed | virtual |
compl | inline | sizeof | volatile |
const | int | static | while |
constexpr2 | long | static_assert2 | xor |
const_cast | mutable | static_cast | xor_eq |
continue | namespace | struct |
decltype2 | new | switch |
1 指在 C++11 中发生了变化。
2 C++11 特性
联系客服