Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5cde49b

Browse files
committedNov 24, 2024··
P3176R1 The Oxford variadic comma
1 parent aed9756 commit 5cde49b

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
@@ -3602,8 +3602,10 @@
36023602
\indextext{declaration!function}%
36033603
\begin{bnf}
36043604
\nontermdef{parameter-declaration-clause}\br
3605-
\opt{parameter-declaration-list} \opt{\terminal{...}}\br
3606-
parameter-declaration-list \terminal{,} \terminal{...}
3605+
\terminal{...}\br
3606+
\opt{parameter-declaration-list}\br
3607+
parameter-declaration-list \terminal{,} \terminal{...}\br
3608+
parameter-declaration-list \terminal{...}
36073609
\end{bnf}
36083610

36093611
\begin{bnf}
@@ -3659,9 +3661,13 @@
36593661
argument and are not function parameter packs.
36603662
Where syntactically correct and where ``\tcode{...}'' is not
36613663
part of an \grammarterm{abstract-declarator},
3662-
``\tcode{, ...}''
3664+
``\tcode{...}''
36633665
is synonymous with
3664-
``\tcode{...}''.
3666+
``\tcode{, ...}''.
3667+
A \grammarterm{parameter-declaration-clause}
3668+
of the form
3669+
\grammarterm{parameter-declaration-list} \tcode{...}
3670+
is deprecated.
36653671
\begin{example}
36663672
The declaration
36673673
\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.
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.array.comp]{Array comparisons}
120133

0 commit comments

Comments
 (0)
Please sign in to comment.