From Jason Turner

[cpp.replace]

Diff to HTML by rtfpessoa

tmp/tmpnn7gem7q/{from.md → to.md} RENAMED
@@ -81,16 +81,16 @@ macro. The individual arguments within the list are separated by comma
81
  preprocessing tokens, but comma preprocessing tokens between matching
82
  inner parentheses do not separate arguments. If there are sequences of
83
  preprocessing tokens within the list of arguments that would otherwise
84
  act as preprocessing directives,[^10] the behavior is undefined.
85
 
86
- If there is a `...` in the identifier-list in the macro definition, then
87
- the trailing arguments, including any separating comma preprocessing
88
- tokens, are merged to form a single item: the variable arguments. The
89
- number of arguments so combined is such that, following merger, the
90
- number of arguments is one more than the number of parameters in the
91
- macro definition (excluding the `...`).
92
 
93
  ### Argument substitution <a id="cpp.subst">[[cpp.subst]]</a>
94
 
95
  After the arguments for the invocation of a function-like macro have
96
  been identified, argument substitution takes place. A parameter in the
@@ -249,11 +249,11 @@ To illustrate the rules for redefinition and reexamination, the sequence
249
  #define f(a) f(x * (a))
250
  #undef x
251
  #define x 2
252
  #define g f
253
  #define z z[0]
254
- #define h g(\sim
255
  #define m(a) a(w)
256
  #define w 0,1
257
  #define t(a) a
258
  #define p() int
259
  #define q(x) x
@@ -269,11 +269,11 @@ char c[2][6] = { str(hello), str() };
269
 
270
  results in
271
 
272
  ``` cpp
273
  f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
274
- f(2 * (2+(3,4)-0,1)) | f(2 * (\sim 5)) & f(2 * (0,1))^m(0,1);
275
  int i[] = { 1, 23, 4, 5, };
276
  char c[2][6] = { "hello", "" };
277
  ```
278
 
279
  To illustrate the rules for creating character string literals and
 
81
  preprocessing tokens, but comma preprocessing tokens between matching
82
  inner parentheses do not separate arguments. If there are sequences of
83
  preprocessing tokens within the list of arguments that would otherwise
84
  act as preprocessing directives,[^10] the behavior is undefined.
85
 
86
+ If there is a `...` immediately preceding the `)` in the function-like
87
+ macro definition, then the trailing arguments, including any separating
88
+ comma preprocessing tokens, are merged to form a single item: the
89
+ *variable arguments*. The number of arguments so combined is such that,
90
+ following merger, the number of arguments is one more than the number of
91
+ parameters in the macro definition (excluding the `...`).
92
 
93
  ### Argument substitution <a id="cpp.subst">[[cpp.subst]]</a>
94
 
95
  After the arguments for the invocation of a function-like macro have
96
  been identified, argument substitution takes place. A parameter in the
 
249
  #define f(a) f(x * (a))
250
  #undef x
251
  #define x 2
252
  #define g f
253
  #define z z[0]
254
+ #define h g(~
255
  #define m(a) a(w)
256
  #define w 0,1
257
  #define t(a) a
258
  #define p() int
259
  #define q(x) x
 
269
 
270
  results in
271
 
272
  ``` cpp
273
  f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);
274
+ f(2 * (2+(3,4)-0,1)) | f(2 * (~ 5)) & f(2 * (0,1))^m(0,1);
275
  int i[] = { 1, 23, 4, 5, };
276
  char c[2][6] = { "hello", "" };
277
  ```
278
 
279
  To illustrate the rules for creating character string literals and