Operators are listed top to bottom, in descending precedence. Operators with the same number have equal precedence and the same associativity.

  1. ::
  2. The postfix operators: [] () T(...) . -> ++ -- dynamic_cast static_cast reinterpret_cast const_cast typeid
  3. The unary prefix operators: ++ -- \\* & \\+ \\- \\! ~ sizeof new delete delete[]; the C-style cast notation, (T)...; (C++11 and above) sizeof... alignof noexcept
  4. .* and ->*
  5. \\*, /, and %, binary arithmetic operators
  6. \\+ and \\-, binary arithmetic operators
  7. << and >>
  8. \\<, \\>, <=, >=
  9. == and !=
  10. &, the bitwise AND operator
  11. ^
  12. |
  13. &&
  14. ||
  15. ?: (ternary conditional operator)
  16. =, *=, /=, %=, +=, -=, >>=, <<=, &=, ^=, |=
  17. throw
  18. , (the comma operator)