C++ keywords

From Cppreference

< cpp
Jump to: navigation, search

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.

and
and_eq
alignas (C++11 feature)
alignof (C++11 feature)
asm
auto(1)
bitand
bitor
bool
break
case
catch
char
char16_t(C++11 feature)
char32_t(C++11 feature)
class
compl
const
constexpr(C++11 feature)
const_cast
continue
decltype(C++11 feature)
default(1)
delete(1)
double
dynamic_cast
else

enum
explicit (todo)
export
extern (todo)
false
float
for
friend
goto
if
inline
int
long
mutable
namespace
new
noexcept(C++11 feature)
not
not_eq
nullptr (C++11 feature)
operator
or
or_eq
private
protected
public
register
reinterpret_cast

return
short
signed
sizeof
static
static_assert(C++11 feature)
static_cast
struct
switch
template
this
thread_local(C++11 feature)
throw
true
try
typedef
typeid
typename
union
unsigned
using(1)
virtual
void
volatile
wchar_t
while
xor
xor_eq

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.