Complete List of Keywords in C++

  1. alignas
  2. alignof
  3. and
  4. and_eq
  5. asm
  6. auto
  7. bitand
  8. bitor
  9. bool
  10. break
  11. case
  12. catch
  13. char
  14. char8_t
  15. char16_t
  16. char32_t
  17. class
  18. compl
  19. const
  20. constexpr
  21. constinit
  22. consteval
  23. continue
  24. co_await
  25. co_return
  26. co_yield
  27. decltype
  28. default
  29. delete
  30. do
  31. double
  32. dynamic_cast
  33. else
  34. enum
  35. explicit
  36. export
  37. extern
  38. false
  39. float
  40. for
  41. friend
  42. goto
  43. if
  44. inline
  45. int
  46. long
  47. mutable
  48. namespace
  49. new
  50. noexcept
  51. not
  52. not_eq
  53. nullptr
  54. operator
  55. or
  56. or_eq
  57. private
  58. protected
  59. public
  60. register
  61. reinterpret_cast
  62. requires
  63. return
  64. short
  65. signed
  66. sizeof
  67. static
  68. static_assert
  69. struct
  70. switch
  71. template
  72. this
  73. thread_local
  74. throw
  75. true
  76. try
  77. typedef
  78. typeid
  79. typename
  80. union
  81. unsigned
  82. using
  83. virtual
  84. void
  85. volatile
  86. wchar_t
  87. while
  88. xor
  89. xor_eq

C++ Keywords and their Descriptions

alignas
Specifies alignment for a type or variable (C++11).
alignof
Returns the alignment requirement of a type (C++11).
and
Alternative representation for logical AND operator (&&).
and_eq
Alternative representation for the bitwise AND assignment operator (&=).
asm
Specifies assembly language instructions (compiler-specific).
auto
Specifies that the type of a variable will be automatically deduced (C++11).
bitand
Alternative representation for bitwise AND operator (&).
bitor
Alternative representation for bitwise OR operator (|).
bool
Defines a boolean type with values true and false.
break
Exits from a loop or a switch statement.
case
Defines a branch in a switch statement.
catch
Catches exceptions thrown by a try block.
char
Defines a character data type.
char8_t
Defines an 8-bit character type (C++20).
char16_t
Defines a 16-bit character type (C++11).
char32_t
Defines a 32-bit character type (C++11).
class
Declares a class type.
compl
Alternative representation for bitwise NOT operator (~).
concept
Defines a concept for template constraints (C++20).
const
Declares a constant variable or specifies that a function parameter or return value cannot be modified.
consteval
Specifies immediate evaluation of a constant expression (C++20).
constexpr
Specifies that a function or variable can be evaluated at compile time (C++11).
constinit
Specifies constant initialization of a variable (C++20).
continue
Skips the remaining code in the current loop iteration and proceeds to the next iteration.
co_await
Suspends execution until the awaited coroutine completes (C++20).
co_return
Returns a value from a coroutine (C++20).
co_yield
Yields a value from a coroutine (C++20).
decltype
Inspects the declared type of an expression (C++11).
default
Specifies the default branch in a switch statement or the default implementation of a special member function.
delete
Deallocates memory or disables a function.
do
Defines a loop that executes at least once.
double
Defines a double-precision floating-point type.
dynamic_cast
Safely casts between pointers or references of related types.
else
Defines the alternative branch in an if-else statement.
enum
Defines an enumeration type.
explicit
Specifies that a constructor or conversion function cannot be used implicitly.
export
Specifies exported templates or modules (C++20).
extern
Specifies that a variable or function has external linkage.
false
Boolean constant representing logical false.
float
Defines a single-precision floating-point type.
for
Defines a loop that iterates a specific number of times.
friend
Grants access to private and protected members of a class.
goto
Transfers control to a labeled statement.
if
Defines a conditional branch in the code.
inline
Suggests to the compiler to expand the function body at the call site.
int
Defines an integer type.
long
Defines a long integer type.
mutable
Specifies that a member of a constant object can be modified.
namespace
Defines a scope for identifiers to avoid name collisions.
new
Allocates memory dynamically.
noexcept
Specifies that a function does not throw exceptions (C++11).
not
Alternative representation of the logical NOT operator (!).
not_eq
Alternative representation of the inequality operator (!=).
nullptr
Defines a null pointer constant (C++11).
operator
Overloads operators for user-defined types.
or
Alternative representation of the logical OR operator (||).
or_eq
Alternative representation of the bitwise OR assignment operator (|=).
private
Defines private access specifiers in a class.
protected
Defines protected access specifiers in a class.
public
Defines public access specifiers in a class.
register
Suggests to the compiler to store a variable in a CPU register.
reinterpret_cast
Performs a type conversion that is not checked for safety.
requires
Used to define constraints for templates and concepts.
return
Returns a value from a function.
short
Defines a short integer type.
signed
Specifies that a variable is a signed integer.
sizeof
Returns the size of a type or variable in bytes.
static
Specifies that a variable retains its value between function calls or defines a class-level variable.
static_assert
Performs a compile-time assertion (C++11).
static_cast
Performs a checked type conversion.
struct
Defines a structure type.
switch
Defines a multi-way branch statement.
template
Defines a template for generic programming.
this
Refers to the calling object in a member function.
thread_local
Specifies that a variable is local to a thread (C++11).
throw
Throws an exception.
true
Boolean constant representing logical true.
try
Defines a block to test for exceptions.
typedef
Defines an alias for a type.
typeid
Returns runtime type information of an expression.
typename
Specifies a type in a template.
union
Defines a union type.
unsigned
Specifies that a variable is an unsigned integer.
using
Imports a namespace or defines an alias for a type (C++11).
virtual
Specifies that a function can be overridden in a derived class.
void
Specifies that a function does not return a value.
volatile
Specifies that a variable can be changed unexpectedly.
wchar_t
Defines a wide character type.
while
Defines a loop that executes while a condition is true.
xor
Alternative representation for the bitwise XOR operator (^).
xor_eq
Alternative representation for the bitwise XOR assignment operator (^=).