A - Keywords

Warning

🚧 Page Under Construction! 🏗️

This is the list of keywords reserved by C++. This means these words cannot be used as an identifier for variables, functions, class/struct member names etc.. Some are reserved with no current or deprecated usecase.

Currently in Use

KeywordDescription
alignas (C++11)
and
and_eq
asm
auto
bitand
bitor
break
case
catch
class
compl
concept (C++20)
const
consteval (C++20)
constexpr (C++11)
constinit (C++20)
continue
co_await (C++20)
co_return (C++20)
co_yield (C++20)
decltype (C++11)
default
do
double
else
enum
explicit
export
extern
false
float
for
friend
goto
if
inline
mutable
namespace
noexcept (C++11)
not
not_eq
nullptr (C++11)
operator
or
or_eq
private
protected
public
register
requires (C++20)
return
signed
sizeof
static
static_assert (C++11)
struct
switch
template
this
thread_local (C++11)
throw
true
try
typedef
typename
union
unsigned
using
virtual
void
volatile
while
xor
xor_eq

Reserved In Specific Contexts

These keywords are reserved in specific circumstances like in a class declaration etc..

KeywordDescription
final (C++11)Specifies virtual member function cannot be overridden in child class.
override (C++11)Specifies virtual member function definition overrides parent definition.
import (C++20)Module import declaration.
module (C++20)Module and module fragment declaration.

Reserved for Future Use

These keywords are reserved for experimental features being tested in a Technical Specification.

KeywordTechnical SpecificationDescription
atomic_cancelTransactional Memory (TM) TSStarts atomic block that will restore data modified during atomic block for some exception types, otherwise it will call std::abort.
atomic_commitTransactional Memory (TM) TSStarts atomic block that commits data changes regardless of exceptions being thrown.
atomic_noexceptTransactional Memory (TM) TSStarts atomic block that will call std::abort if exception is thrown within the block.
reflexprReflection TSProvides meta info about an object by returning a meta-object.
synchronizedTransactional Memory (TM) TSStarts a synchronized block
transaction_safeTransactional Memory (TM) TSIndicates that a function is transaction-safe.
transaction_safe_dynamicTransactional Memory (TM) TSIndicates that a virtual function is transaction-safe.