Postfix Expressions

Postfix operators are operators that appear after their operands. A postfix expression is a primary expression, or a primary expression that contains a postfix operator. The following summarizes the available postfix operators:

Precedence and associativity of postfix operators
Rank Right Associative? Operator Function Usage
2
member selection object . member
2
member selection pointer -> member
2
subscripting pointer [ expr ]
2
function call expr ( expr_list )
2
value construction type ( expr_list )
2
postfix increment lvalue ++
2
postfix decrement lvalue --
2

compound literals (type-name) {initializer-list}
2 yes C++type identification
typeid ( type )
2 yes C++type identification at run time
typeid ( expr )
2 yes C++conversion checked at compile time
static_cast < type > ( expr )
2 yes C++conversion checked at run time
dynamic_cast < type > ( expr )
2 yes C++unchecked conversion
reinterpret_cast < type > ( expr )
2 yes C++const conversion
const_cast < type > ( expr )

Related References

IBM Copyright 2003