Operators | Associativity |
( ) [ ] –> . | left to right |
(unary operators) + – ! ~ ++ -- * & (type) sizeof | right to left |
(binary operators) * / % | left to right |
(binary operators) + – | left to right |
<< >> | left to right |
< <= > >= | left to right |
== != | left to right |
& | left to right |
^ | left to right |
| | left to right |
&& | left to right |
|| | left to right |
?: | right to left |
= += -= *= /= %= &= ^= |= <<= >>= | right to left |
, | left to right |
declaration | definition | |
default arguments | yes | no |
inline (no class) | no | yes |
inline (with class) | no | yes |
static data member | yes | no |
static member function | yes | no |
const member function | yes | yes |
member initialization list | no | yes |
friend | yes | no |
virtual | yes | no |
pure virtual | yes | no |