
C++ 速查手冊
2.1 - 關鍵字
關鍵字為具有語法功能的保留字 (reserved word) , C++11 的關鍵字共有 86 個,如以下列表
| alignas* | alignof* | and |
| and_eq | asm | auto |
| bitand | bitor | bool |
| break | case | catch |
| char | char16_t* | char32_t* |
| class | compl | const |
| constexpr | const_cast* | continue |
| decltype* | default** | delete** |
| do | double | dynamic_cast |
| else | enum | explicit |
| export** | extern | false |
| final*** | float | for |
| friend | goto | if |
| inline | int | long |
| mutable | namespace | new |
| noexcept* | not | not_eq |
| nullptr* | operator | or |
| or_eq | override*** | private |
| protected | public | register |
| reinterpret_cast | return | short |
| signed | sizeof | static |
| static_assert* | static_cast | struct |
| switch | template | this |
| thread_local* | throw | true |
| try | typedef | typeid |
| typename | union | unsigned |
| using | virtual | void |
| volatile | wchar_t | while |
| xor | xor_eq |
| * | 在 C++11 加入的關鍵字。 |
| ** | 在 C++11 中改變原有的意義。 |
| *** | 在 C++11 中是具有特殊意義的識別字。 |
關鍵字可用作指示詞 (specifier) 、修飾詞 (modifier) 、陳述 (statement) 、運算子等。
相關教學影片
