From Jason Turner

[expr.comma]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp8me1s_tb/{from.md → to.md} +20 -14
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
- [[expr]]).[^27] Every value computation and side effect associated with
14
- the left expression is sequenced before every value computation and side
15
- effect associated with the right expression. The type and value of the
16
- result are the type and value of the right operand; the result is of the
17
- same value category as its right operand, and is a bit-field if its
18
- right operand is a glvalue and a bit-field. If the value of the right
19
- operand is a temporary ([[class.temporary]]), the result is that
20
- temporary.
21
-
22
- In contexts where comma is given a special meaning, in lists of
23
- arguments to functions ([[expr.call]]) and lists of initializers (
24
- [[dcl.init]]) the comma operator as described in Clause  [[expr]] can
25
- appear only in parentheses.
 
 
 
 
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
+