Descending order of priority
Operator |
Function |
Usage |
:: |
Full Local Area |
: Name |
:: |
Category |
Classtype: name |
:: |
Namespace domain |
Namespace: name |
. |
Member Selection |
Object. member |
-> |
Member Selection |
Pointer-> member |
[] |
Subscript |
Variable [expr] |
() |
Function call |
Name (expr_list) |
() |
Type Construction |
Type (expr_list) |
++ |
Post Increment |
Lvalue ++ |
-- |
Post-Decrease |
Lvalue -- |
Typeid |
Type ID |
Typeid (type) |
Typeid |
Runtime type ID |
Typeid (expr) |
Const_cast |
Type conversion |
Const_cast <type> (expr) |
Dynamic_cast |
Type conversion |
Dynamic_cast <type> (expr) |
Reinterpret_cast |
Type conversion |
Reinterpret_cast <type> (expr) |
Static_cast |
Type conversion |
Static_cast <type> (expr) |
Sizeof |
Object size |
Sizeof object
|
Sizeof |
Type size
|
Sizeof (type) |
++ |
Increment |
++ Lvalue |
-- |
Descending front |
-- Lvalue |
~ |
Non-bitwise |
~ Expr |
! |
Non-logical |
! Expr |
- |
RMB reduction |
-Expr |
+ |
Mona1 Addition |
+ Expr |
* |
Unreference |
* Expr |
& |
Fetch address |
& Expr |
() |
Type conversion |
(Type) expr |
New |
Allocation object |
New type
|
New |
Allocate/initialize objects |
New type (expr_list)
|
New |
Allocate/replace objects |
New (expr_list) type (expr_list) |
New |
Allocate an array |
All Forms |
Delete |
Release object |
All Forms |
Delete |
Release an array |
All Forms |
-> * |
Point to member selection |
Pointer-> * pointer_to_member |
.* |
Point to member selection |
Object. * pointer_to_member |
* |
Multiplication |
Expr * expr
|
/ |
/ |
Expr/expr |
% |
Modulo (remainder) |
Expr % expr |
+ |
Add |
Expr + expr |
- |
Subtraction |
Expr-expr |
< |
Shift left by bit |
Expr <expr
|
> |
Shift right by bit |
Expr> expr
|
< |
Less |
Expr <expr
|
<= |
Less than or equal |
Expr <= expr
|
> |
Greater |
Expr> expr
|
> = |
Greater than or equal |
Expr> = expr
|
= |
Equal |
Expr = expr
|
! = |
Not equal |
Expr! = Expr
|
& |
Bitwise AND |
Expr & expr
|
^ |
Bitwise OR |
Expr ^ expr
|
| |
By bit or |
Expr | expr
|
&& |
Logic and |
Expr & expr
|
| |
Logic or |
Expr | expr
|
? : |
Conditional expressions |
Expr? Expr: expr |
= |
Assignment |
Lvalue = expr |
=, * =,/=, % =, + =,-=, <=, >>=, & =, | =, ^ = |
Compound assignment |
Lvalue + = expr and so on
|
Throw |
Throw an exception |
Throw expr
|
, |
Comma |
Expr, expr
|