Common operators |
assignment |
increment |
arithmetic |
logical |
comparison |
member |
other |
decrement |
access |
a = b |
++a |
+a |
!a |
a == b |
a[b] |
a(...) |
a = rvalue |
--a |
-a |
a && b |
a != b |
*a |
a, b |
a += b |
a++ |
a + b |
a || b |
a < b |
&a |
(type) a |
a -= b |
a-- |
a - b |
|
a > b |
a->b |
? : |
a *= b |
|
a * b |
|
a <= b |
a.b |
|
a /= b |
|
a / b |
|
a >= b |
a->*b |
|
a %= b |
|
a % b |
|
|
a.*b |
|
a &= b |
|
~a |
|
|
|
|
a |= b |
|
a & b |
|
|
|
|
a ^= b |
|
a | b |
|
|
|
|
a <<= b |
|
a ^ b |
|
|
|
|
a >>= b |
|
a << b |
|
|
|
|
|
|
a >> b |
|
|
|
|
Special operators |
static_cast converts
one type to another compatible type |
dynamic_cast converts
virtual base class to derived class |
const_cast converts type
to compatible type with different cv qualifiers |
reinterpret_cast converts type to incompatible type |
new allocates
memory |
delete deallocates
memory |
sizeof queries
the size of a type |
sizeof... queries the
size of a parameter pack (since C++11) |
typeid queries
the type information of a type |
noexcept checks
if an expression can throw an exception (since C++11) |
alignof queries
alignment requirements of a type (since C++11) |