General topics | ||||||||||||||||
| ||||||||||||||||
Flow control | ||||||||||||||||
Conditional execution statements | ||||||||||||||||
Iteration statements (loops) | ||||||||||||||||
Jump statements | ||||||||||||||||
Functions | ||||||||||||||||
Function declaration | ||||||||||||||||
Lambda function expression | ||||||||||||||||
inline specifier | ||||||||||||||||
Dynamic exception specifications(until C++17*) | ||||||||||||||||
noexcept specifier(C++11) | ||||||||||||||||
Exceptions | ||||||||||||||||
Namespaces | ||||||||||||||||
Types | ||||||||||||||||
Specifiers | ||||||||||||||||
| ||||||||||||||||
Storage duration specifiers | ||||||||||||||||
Initialization | ||||||||||||||||
Expressions | ||||||||||||||||
Alternative representations | ||||||||||||||||
Literals | ||||||||||||||||
Boolean -Integer -Floating-point | ||||||||||||||||
Character -String -nullptr(C++11) | ||||||||||||||||
User-defined(C++11) | ||||||||||||||||
Utilities | ||||||||||||||||
Attributes(C++11) | ||||||||||||||||
Types | ||||||||||||||||
typedef declaration | ||||||||||||||||
Type alias declaration(C++11) | ||||||||||||||||
Casts | ||||||||||||||||
Memory allocation | ||||||||||||||||
Classes | ||||||||||||||||
Class-specific function properties | ||||||||||||||||
| ||||||||||||||||
Special member functions | ||||||||||||||||
Templates | ||||||||||||||||
Miscellaneous | ||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Identifiers with special meaning | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This is a list of reserved keywords in C++. Since they are used by the language, these keywords are not available for re-definition or overloading. As an exception, they are not considered reserved inattributes (excluding attribute argument lists).(since C++11)
A – C | D – P | R – Z |
---|---|---|
|
|
|
Note that:and
,bitor
,or
,xor
,compl
,bitand
,and_eq
,or_eq
,xor_eq
,not
andnot_eq
(along with digraphs:<%,%>,<:,:>,%:,%:%: and trigraphs:??<,??>,??(,??),??=,??/,??',??!,??-(until C++17)) provide analternative way to represent standard tokens. These keywords are also considered reserved in attributes (excluding attribute argument lists), but some implementations handle them the same as the others.(since C++11)
In addition to keywords, there areidentifiers with special meaning, which may be used as names of objects or functions, but have special meaning in certain contexts.
|
Also, allidentifiers that contain a double underscore__
in any position and each identifier that begins with an underscore followed by an uppercase letter is always reserved, and all identifiers that begin with an underscore are reserved for use as names in the global namespace. Seeidentifiers for more details.
The namespacestd
is used to place names of the standard C++ library. SeeExtending namespace std for the rules about adding names to it.
The name | (since C++11) |
The following tokens are recognized by thepreprocessor when in context of a preprocessor directive:
defined |
The following tokens are recognized by thepreprocessoroutside the context of a preprocessor directive:
_Pragma(C++11) |
C documentation forkeywords |