@@ -100,14 +100,27 @@ The subexpression `h()` above has no smallest short-circuit expression.
100
100
$(H2 $(LNAME2 order-of-evaluation, Order Of Evaluation))
101
101
102
102
$(P Built-in prefix unary expressions `++` and `--` are evaluated as if lowered (rewritten) to
103
- assignments as follows: `++expr` becomes `((expr) += 1)`, and `--expr` becomes `((expr) -= 1)`.
103
+ $(RELATIVE_LINK2 assignment_operator_expressions, assignments) as follows:)
104
+
105
+ $(TABLE
106
+ $(THEAD Expression, Equivalent)
107
+ $(TROW `++expr`, `((expr) += 1)`)
108
+ $(TROW `--expr`, `((expr) -= 1)`)
109
+ )
110
+ $(P
104
111
Therefore, the result of prefix `++` and `--` is the lvalue after the side effect has been
105
112
effected.)
106
113
107
114
$(P Built-in postfix unary expressions `++` and `--` are evaluated as if lowered (rewritten) to
108
115
$(DDSUBLINK spec/expression, function_literals, lambda)
109
- invocations as follows: `expr++` becomes `(ref T x){auto t = x; ++x; return t;}(expr)`, and
110
- `expr--` becomes `(ref T x){auto t = x; --x; return t;}(expr)`. Therefore, the result of postfix
116
+ invocations as follows:)
117
+
118
+ $(TABLE
119
+ $(THEAD Expression, Equivalent)
120
+ $(TROW `expr++`, `(ref x){auto t = x; ++x; return t;}(expr)`)
121
+ $(TROW `expr--`, `(ref x){auto t = x; --x; return t;}(expr)`)
122
+ )
123
+ $(P Therefore, the result of postfix
111
124
`++` and `--` is an rvalue just before the side effect has been effected.)
112
125
113
126
$(P Binary expressions except for $(GLINK AssignExpression), $(GLINK OrOrExpression), and
0 commit comments