C++ keywords |BeingStudy.com

Posted on

It is a listing of reserved key phrases in C++. Since they’re utilized by the language, these key phrases aren’t accessible 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
express
export(1)
extern(1)
false
float
for
pal
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
personal
protected
public
register(2)
reinterpret_cast
requires (ideas TS)
return
quick
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
unstable
wchar_t
whereas
xor
xor_eq
  • (1) – which means modified or new which means added in C++11. Word: the key phrase export can be utilized by Modules TS.
  • (2) – which means modified in C++17.

Word that and, bitor, or, xor, compl, bitand, and_eq, or_eq, xor_eq, not, and not_eq (together with the digraphs <%, %>, <:, :>, %:, and %:%:) present another solution to symbolize customary tokens.

Along with key phrases, there are identifiers with particular which means, which can be used as names of objects or features, however have particular which means in sure contexts.

override (C++11)
ultimate (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 at all times 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