Operator Precedence and Associativity

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

Placement of keywords

declaration definition
default arguments yesno
inline (no class) noyes
inline (with class) noyes
static data member yesno
static member function yesno
const member function yesyes
member initialization list noyes
friend yesno
virtual yesno
pure virtual yesno