tmp/tmp8me1s_tb/{from.md → to.md}
RENAMED
|
@@ -7,26 +7,32 @@ expression:
|
|
| 7 |
assignment-expression
|
| 8 |
expression ',' assignment-expression
|
| 9 |
```
|
| 10 |
|
| 11 |
A pair of expressions separated by a comma is evaluated left-to-right;
|
| 12 |
-
the left expression is a discarded-value expression (Clause
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
arguments to functions ([[expr.call]]) and
|
| 24 |
-
[[dcl.init]])
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
``` cpp
|
| 28 |
f(a, (t=3, t+2), c);
|
| 29 |
```
|
| 30 |
|
| 31 |
has three arguments, the second of which has the value `5`.
|
| 32 |
|
|
|
|
|
|
|
|
|
| 7 |
assignment-expression
|
| 8 |
expression ',' assignment-expression
|
| 9 |
```
|
| 10 |
|
| 11 |
A pair of expressions separated by a comma is evaluated left-to-right;
|
| 12 |
+
the left expression is a discarded-value expression (Clause [[expr]]).
|
| 13 |
+
Every value computation and side effect associated with the left
|
| 14 |
+
expression is sequenced before every value computation and side effect
|
| 15 |
+
associated with the right expression. The type and value of the result
|
| 16 |
+
are the type and value of the right operand; the result is of the same
|
| 17 |
+
value category as its right operand, and is a bit-field if its right
|
| 18 |
+
operand is a bit-field. If the right operand is a temporary expression (
|
| 19 |
+
[[class.temporary]]), the result is a temporary expression.
|
| 20 |
+
|
| 21 |
+
In contexts where comma is given a special meaning,
|
| 22 |
+
|
| 23 |
+
[*Example 1*: in lists of arguments to functions ([[expr.call]]) and
|
| 24 |
+
lists of initializers ([[dcl.init]]) — *end example*]
|
| 25 |
+
|
| 26 |
+
the comma operator as described in Clause [[expr]] can appear only in
|
| 27 |
+
parentheses.
|
| 28 |
+
|
| 29 |
+
[*Example 2*:
|
| 30 |
|
| 31 |
``` cpp
|
| 32 |
f(a, (t=3, t+2), c);
|
| 33 |
```
|
| 34 |
|
| 35 |
has three arguments, the second of which has the value `5`.
|
| 36 |
|
| 37 |
+
— *end example*]
|
| 38 |
+
|