Difference between revisions of "cpp/keyword"
m (Keywords table: Move `decltype` to 2nd column, move `reflexpr` to 3rd column, add headers, align vertically to the top.) |
m (Keywords table: Put a space before a number mark.) |
||
Line 17: | Line 17: | ||
{{ltt|cpp/language/transactional_memory|atomic_commit}} {{mark since tm ts}}<br> | {{ltt|cpp/language/transactional_memory|atomic_commit}} {{mark since tm ts}}<br> | ||
{{ltt|cpp/language/transactional_memory|atomic_noexcept}} {{mark since tm ts}}<br> | {{ltt|cpp/language/transactional_memory|atomic_noexcept}} {{mark since tm ts}}<br> | ||
− | {{rlt|auto}}{{mark|1}}<br> | + | {{rlt|auto}} {{mark|1}}<br> |
{{rlt|bitand}}<br> | {{rlt|bitand}}<br> | ||
{{rlt|bitor}}<br> | {{rlt|bitor}}<br> | ||
Line 28: | Line 28: | ||
{{rlt|char16_t}} {{mark since c++11}}<br> | {{rlt|char16_t}} {{mark since c++11}}<br> | ||
{{rlt|char32_t}} {{mark since c++11}}<br> | {{rlt|char32_t}} {{mark since c++11}}<br> | ||
− | {{rlt|class}}{{mark|1}}<br> | + | {{rlt|class}} {{mark|1}}<br> |
{{rlt|compl}}<br> | {{rlt|compl}}<br> | ||
{{rlt|concept}} {{mark since c++20}}<br> | {{rlt|concept}} {{mark since c++20}}<br> | ||
Line 42: | Line 42: | ||
| | | | ||
{{rlt|decltype}} {{mark since c++11}}<br> | {{rlt|decltype}} {{mark since c++11}}<br> | ||
− | {{rlt|default}}{{mark|1}}<br> | + | {{rlt|default}} {{mark|1}}<br> |
− | {{rlt|delete}}{{mark|1}}<br> | + | {{rlt|delete}} {{mark|1}}<br> |
{{rlt|do}}<br> | {{rlt|do}}<br> | ||
{{rlt|double}}<br> | {{rlt|double}}<br> | ||
Line 50: | Line 50: | ||
{{rlt|enum}}<br> | {{rlt|enum}}<br> | ||
{{rlt|explicit}}<br> | {{rlt|explicit}}<br> | ||
− | {{rlt|export}}{{mark|1}}{{mark|3}}<br> | + | {{rlt|export}} {{mark|1}} {{mark|3}}<br> |
− | {{rlt|extern}}{{mark|1}}<br> | + | {{rlt|extern}} {{mark|1}}<br> |
{{rlt|false}}<br> | {{rlt|false}}<br> | ||
{{rlt|float}}<br> | {{rlt|float}}<br> | ||
Line 58: | Line 58: | ||
{{rlt|goto}}<br> | {{rlt|goto}}<br> | ||
{{rlt|if}}<br> | {{rlt|if}}<br> | ||
− | {{rlt|inline}}{{mark|1}}<br> | + | {{rlt|inline}} {{mark|1}}<br> |
{{rlt|int}}<br> | {{rlt|int}}<br> | ||
{{rlt|long}}<br> | {{rlt|long}}<br> | ||
− | {{rlt|mutable}}{{mark|1}}<br> | + | {{rlt|mutable}} {{mark|1}}<br> |
{{rlt|namespace}}<br> | {{rlt|namespace}}<br> | ||
{{rlt|new}}<br> | {{rlt|new}}<br> | ||
Line 76: | Line 76: | ||
| | | | ||
{{rlt|reflexpr}} {{mark since reflection ts}}<br> | {{rlt|reflexpr}} {{mark since reflection ts}}<br> | ||
− | {{rlt|register}}{{mark|2}}<br> | + | {{rlt|register}} {{mark|2}}<br> |
{{rlt|reinterpret_cast}}<br> | {{rlt|reinterpret_cast}}<br> | ||
{{rlt|requires}} {{mark since c++20}}<br> | {{rlt|requires}} {{mark since c++20}}<br> | ||
Line 82: | Line 82: | ||
{{rlt|short}}<br> | {{rlt|short}}<br> | ||
{{rlt|signed}}<br> | {{rlt|signed}}<br> | ||
− | {{rlt|sizeof}}{{mark|1}}<br> | + | {{rlt|sizeof}} {{mark|1}}<br> |
{{rlt|static}}<br> | {{rlt|static}}<br> | ||
{{rlt|static_assert}} {{mark since c++11}}<br> | {{rlt|static_assert}} {{mark since c++11}}<br> | ||
{{rlt|static_cast}}<br> | {{rlt|static_cast}}<br> | ||
− | {{rlt|struct}}{{mark|1}}<br> | + | {{rlt|struct}} {{mark|1}}<br> |
{{rlt|switch}}<br> | {{rlt|switch}}<br> | ||
{{ltt|cpp/language/transactional_memory|synchronized}} {{mark since tm ts}}<br> | {{ltt|cpp/language/transactional_memory|synchronized}} {{mark since tm ts}}<br> | ||
Line 100: | Line 100: | ||
{{rlt|union}}<br> | {{rlt|union}}<br> | ||
{{rlt|unsigned}}<br> | {{rlt|unsigned}}<br> | ||
− | {{rlt|using}}{{mark|1}}<br> | + | {{rlt|using}} {{mark|1}}<br> |
{{rlt|virtual}}<br> | {{rlt|virtual}}<br> | ||
{{rlt|void}}<br> | {{rlt|void}}<br> |
Revision as of 10:04, 17 December 2020
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.
- (1) - meaning changed or new meaning added in C++11.
- (2) - meaning changed in C++17.
- (3) - meaning changed in C++20.
Note that and
, bitor
, or
, xor
, compl
, bitand
, and_eq
, or_eq
, xor_eq
, not
, and not_eq
(along with the digraphs <%
, %>
, <:
, :>
, %:
, and %:%:
) provide an alternative way to represent standard tokens.
In addition to keywords, there are identifiers with special meaning, which may be used as names of objects or functions, but have special meaning in certain contexts.
final (C++11) |
Also, all identifiers 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. See identifiers for more details.
The namespace std
is used to place names of the standard C++ library. See Extending namespace std for the rules about adding names to it.
The name |
(since C++11) |
The following tokens are recognized by the preprocessor when in context of a preprocessor directive:
defined |
The following tokens are recognized by the preprocessor outside the context of a preprocessor directive:
_Pragma(since C++11) |
See also
C documentation for C keywords
|