This can be a listing of reserved key phrases in C++. Since they’re utilized by the language, these key phrases should not obtainable for re-definition or overloading.
alignas (since C++11)alignof (since C++11)and and_eq asm atomic_cancel (TM TS) atomic_commit (TM TS) atomic_noexcept (TM TS) auto (1)bitand bitor bool break case catch char char16_t (since C++11)char32_t (since C++11)class (1)compl idea (ideas TS)const constexpr (since C++11)const_cast proceed decltype (since C++11)default (1)delete (1)do double |
dynamic_cast else enum specific export (1)extern (1)false float for good friend goto if import (modules TS)inline (1)int lengthy module (modules TS)mutable (1)namespace new noexcept (since C++11)not not_eq nullptr (since C++11)operator or or_eq non-public protected public register (2) |
reinterpret_cast requires (ideas TS)return brief signed sizeof (1)static static_assert (since C++11)static_cast struct (1)swap synchronized (TM TS) template this thread_local (since C++11)throw true strive typedef typeid typename union unsigned utilizing (1)digital void risky wchar_t whereas xor xor_eq |
- (1) – which means modified or new which means added in C++11. Be aware: the key phrase
export
can be utilized by Modules TS. - (2) – which means modified in C++17.
Be aware that and
, bitor
, or
, xor
, compl
, bitand
, and_eq
, or_eq
, xor_eq
, not
, and not_eq
(together with the digraphs <%
, %>
, <:
, :>
, %:
, and %:%:
) present an alternate approach to signify commonplace tokens.
Along with key phrases, there are identifiers with particular which means, which can be used as names of objects or capabilities, however have particular which means in sure contexts.
override (C++11) remaining (C++11) transaction_safe (TM TS) transaction_safe_dynamic (TM TS) |
Additionally, all identifiers that comprise a double underscore __ in any place and every identifier that begins with an underscore adopted by an uppercase letter is all the time reserved and all identifiers that start with an underscore are reserved to be used as names within the world namespace. See identifiers for extra particulars.
The namespace std
is used to position names of the usual C++ library. See Extending namespace std for the foundations about including names to it.
The identify posix is reserved for a future top-level namespace. The habits is undefined if a program declares or defines something in that namespace. |
(since C++11) |
The next tokens are acknowledged by the preprocessor when in context of a preprocessor directive:
if elif else endif outlined |
ifdef ifndef outline undef |
embrace line error pragma |