3.1 KiB
3.1 KiB
[lex.key]
5 Lexical conventions [lex]
5.12 Keywords [lex.key]
keyword:
any identifier listed in Table 5
import-keyword
module-keyword
export-keyword
The identifiers shown in Table 5 are reserved for use as keywords (that is, they are unconditionally treated as keywords in phase 7) except in an attribute-token ([dcl.attr.grammar]).
[Note 1:
The register keyword is unused but is reserved for future use.
â end note]
Table 5 — Keywords [tab:lex.key]
| ð alignas |
constinit | extern | protected | throw |
|---|---|---|---|---|
| ð alignof |
const_cast | false | public | true |
| ð asm |
continue | float | register | try |
| ð auto |
contract_assert | for | reinterpret_cast | typedef |
| ð bool |
co_await | friend | requires | typeid |
| ð break |
co_return | goto | return | typename |
| ð case |
co_yield | if | short | union |
| ð catch |
decltype | inline | signed | unsigned |
| ð char |
default | int | sizeof | using |
| ð char8_t |
delete | long | static | virtual |
| ð char16_t |
do | mutable | static_assert | void |
| ð char32_t |
double | namespace | static_cast | volatile |
| ð class |
dynamic_cast | new | struct | wchar_t |
| ð concept |
else | noexcept | switch | while |
| ð const |
enum | nullptr | template | |
| ð consteval |
explicit | operator | this | |
| ð constexpr |
export | private | thread_local |
Furthermore, the alternative representations shown in Table 6 for certain operators and punctuators ([lex.digraph]) are reserved and shall not be used otherwise.
Table 6 — Alternative representations [tab:lex.key.digraph]
| ð and |
and_eq | bitand | bitor | compl | not |
|---|---|---|---|---|---|
| ð not_eq |
or | or_eq | xor | xor_eq |