| Symbol |
Name |
Assoc. |
Example |
|
| ::
| scope resolution
| L/R
| class_name::member
|
| ::
| global
| L/R
| ::name
|
|
| .
| member selection
| L/R
| object.member
|
| ->
| member selection
| L/R
| pointer->member
|
| []
| subscripting
| L/R
| pointer [ expr ]
|
| ()
| function call
| L/R
| expr ( expr_list )
|
| ()
| value construction
| L/R
| type ( expr_list )
|
| ++
| post increment
| R/L
| lvalue++
|
| --
| post decrement
| R/L
| lvalue--
|
|
| sizeof
| size of object
| R/L
| sizeof expr
|
| sizeof
| size of type
| R/L
| sizeof ( type )
|
| ++
| pre increment
| R/L
| ++lvalue
|
| --
| pre decrement
| R/L
| --lvalue
|
| ~
| complement
| R/L
| ~ expr
|
| !
| not
| R/L
| ! expr
|
| -
| unary minus
| R/L
| - expr
|
| +
| unary plus
| R/L
| + expr
|
| &
| address of
| R/L
| & lvalue
|
| *
| dereference
| R/L
| * expr
|
| new
| create
| R/L
| new type
|
| delete
| destroy
| R/L
| delete pointer
|
| delete []
| destroy array
| R/L
| delete [] pointer
|
| ()
| type cast
| R/L
| ( type ) expr
|
|
| .*
| member selection
| L/R
| object .* pointer-to-member
|
| ->*
| member selection
| L/R
| pointer ->* pointer-to-member
|
|
| *
| multiply
| L/R
| expr * expr
|
| /
| divide
| L/R
| expr / expr
|
| %
| modulo
| L/R
| expr % expr
|
|
| +
| add
| L/R
| expr + expr
|
| -
| subtract
| L/R
| expr - expr
|
|
| <<
| shift left
| L/R
| expr << expr
|
| >>
| shift right
| L/R
| expr >> expr
|
|
| <
| less than
| L/R
| expr < expr
|
| <=
| less than or equal
| L/R
| expr <= expr
|
| >
| greater than
| L/R
| expr > expr
|
| >=
| greater than or equal
| L/R
| expr >= expr
|
|
| ==
| equal
| L/R
| expr == expr
|
| !=
| not equal
| R/L
| expr != expr
|
|
| &
| bitwise AND
| L/R
| expr & expr
|
|
| ^
| bitwise exclusive OR
| R/L
| expr ^ expr
|
|
| |
| bitwise inclusive OR
| L/R
| expr | expr
|
|
| &&
| logical AND
| L/R
| expr && expr
|
|
| ||
| logical inclusive OR
| L/R
| expr || expr
|
|
| ? :
| conditional expression
| L/R
| expr ? expr : expr
|
|
| =
| simple assignment
| R/L
| lvalue = expr
|
| *=
| multiply and assign
| R/L
| lvalue *= expr
|
| /=
| divide and assign
| R/L
| lvalue /= expr
|
| %=
| modulo and assign
| R/L
| lvalue %= expr
|
| +=
| add and assign
| R/L
| lvalue += expr
|
| -=
| subtract and assign
| R/L
| lvalue -= expr
|
| <<=
| shift left and assign
| R/L
| lvalue <<= expr
|
| >>=
| shift right and assign
| R/L
| lvalue >>= expr
|
| &=
| AND and assign
| R/L
| lvalue &= expr
|
| ^=
| exclusive OR and assign
| R/L
| lvalue ^= expr
|
| |=
| inclusive OR and assign
| R/L
| lvalue |= expr
|
|
| throw
| throw exception
| R/L
| throw expr
|
|
| ,
| comma
| L/R
| expr , expr
|
|