August 2016
Intermediate to advanced
838 pages
22h
English
The following table summarizes C++ operator precedence. In the table, the operators are grouped by precedence level (highest to lowest), and a horizontal line separates each precedence level from the next-lower level. In general, the binary operators group from left to right; the unary operators, from right to left; and the ?: operator, from right to left. Exception: The assignment operators group from right to left.
| Operator | Associativity | Remarks |
| :: | Left to right | Scope resolution (binary) |
| :: | Right to left | Global access (unary) |
| () | Left to right | Function call and function-style cast |
| [] -> . | Left to right | |
| ++ -- | Right to left | ++ and -- as postfix operators |
| typeid ... |
Read now
Unlock full access