Skip to content

Commit 1358c8c

Browse files
authored
Merge 2024-11 CWG Motion 8
P3176R1 The Oxford variadic comma
2 parents fe0a6f8 + cd6f411 commit 1358c8c

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

source/declarations.tex

+10-4
Original file line numberDiff line numberDiff line change
@@ -3623,8 +3623,10 @@
36233623
\indextext{declaration!function}%
36243624
\begin{bnf}
36253625
\nontermdef{parameter-declaration-clause}\br
3626-
\opt{parameter-declaration-list} \opt{\terminal{...}}\br
3627-
parameter-declaration-list \terminal{,} \terminal{...}
3626+
\terminal{...}\br
3627+
\opt{parameter-declaration-list}\br
3628+
parameter-declaration-list \terminal{,} \terminal{...}\br
3629+
parameter-declaration-list \terminal{...}
36283630
\end{bnf}
36293631

36303632
\begin{bnf}
@@ -3680,9 +3682,13 @@
36803682
argument and are not function parameter packs.
36813683
Where syntactically correct and where ``\tcode{...}'' is not
36823684
part of an \grammarterm{abstract-declarator},
3683-
``\tcode{, ...}''
3685+
``\tcode{...}''
36843686
is synonymous with
3685-
``\tcode{...}''.
3687+
``\tcode{, ...}''.
3688+
A \grammarterm{parameter-declaration-clause}
3689+
of the form
3690+
\grammarterm{parameter-declaration-list} \tcode{...}
3691+
is deprecated\iref{depr.ellipsis.comma}.
36863692
\begin{example}
36873693
The declaration
36883694
\begin{codeblock}

source/future.tex

+13
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,19 @@
115115
\end{codeblock}
116116
\end{example}
117117

118+
\rSec1[depr.ellipsis.comma]{Non-comma-separated ellipsis parameters}
119+
120+
A \grammarterm{parameter-declaration-clause}
121+
of the form
122+
\grammarterm{parameter-declaration-list} \tcode{...}
123+
is deprecated\iref{dcl.fct}.
124+
\begin{example}
125+
\begin{codeblock}
126+
void f(int...); // deprecated
127+
void g(auto...); // OK, declares a function parameter pack
128+
void h(auto......); // deprecated
129+
\end{codeblock}
130+
\end{example}
118131

119132
\rSec1[depr.impldec]{Implicit declaration of copy functions}
120133

0 commit comments

Comments
 (0)