7
Expressions
[expr]
7.6
Compound expressions
[expr.compound]
7.6.2
Unary expressions
[expr.unary]
7.6.2.2
Increment and decrement
[expr.pre.incr]
1
#
The operand of prefix
++
is modified by adding
1
.
The operand shall be a modifiable lvalue
.
The type of the operand shall be an arithmetic type other than
cv
bool
, or a pointer to a completely-defined object type
.
The result is the updated operand; it is an lvalue, and it is a bit-field if the operand is a bit-field
.
The expression
++x
is equivalent to
x+=1
.
[
Note
:
See the discussions of
addition
and
assignment operators
for information on conversions
.
—
end note
]
2
#
The operand of prefix
--
is modified by subtracting
1
.
The requirements on the operand of prefix
--
and the properties of its result are otherwise the same as those of prefix
++
.
[
Note
:
For postfix increment and decrement, see
[expr.post.incr]
.
—
end note
]