From cb78101d1857668fd26557f07e2e9d16b8de827d Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 24 Nov 2024 05:17:27 +0100 Subject: [PATCH 1/2] P3176R1 The Oxford variadic comma --- source/declarations.tex | 14 ++++++++++---- source/future.tex | 13 +++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 596c0c4e61..50568790d0 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3623,8 +3623,10 @@ \indextext{declaration!function}% \begin{bnf} \nontermdef{parameter-declaration-clause}\br - \opt{parameter-declaration-list} \opt{\terminal{...}}\br - parameter-declaration-list \terminal{,} \terminal{...} + \terminal{...}\br + \opt{parameter-declaration-list}\br + parameter-declaration-list \terminal{,} \terminal{...}\br + parameter-declaration-list \terminal{...} \end{bnf} \begin{bnf} @@ -3680,9 +3682,13 @@ argument and are not function parameter packs. Where syntactically correct and where ``\tcode{...}'' is not part of an \grammarterm{abstract-declarator}, -``\tcode{, ...}'' +``\tcode{...}'' is synonymous with -``\tcode{...}''. +``\tcode{, ...}''. +A \grammarterm{parameter-declaration-clause} +of the form +\grammarterm{parameter-declaration-list} \tcode{...} +is deprecated. \begin{example} The declaration \begin{codeblock} diff --git a/source/future.tex b/source/future.tex index 9987fbc255..27c4658f9b 100644 --- a/source/future.tex +++ b/source/future.tex @@ -115,6 +115,19 @@ \end{codeblock} \end{example} +\rSec1[depr.ellipsis.comma]{Non-comma-separated ellipsis parameters} + +A \grammarterm{parameter-declaration-clause} +of the form +\grammarterm{parameter-declaration-list} \tcode{...} +is deprecated. +\begin{example} +\begin{codeblock} +void f(int...); // deprecated +void g(auto...); // OK, declares a function parameter pack +void h(auto......); // deprecated +\end{codeblock} +\end{example} \rSec1[depr.impldec]{Implicit declaration of copy functions} From cd6f41141fed92718a6e9ecf84563256a28f265d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Mon, 16 Dec 2024 02:18:49 +0000 Subject: [PATCH 2/2] [dcl.fct, depr.ellipsis.comma] Add mutual cross-references --- source/declarations.tex | 2 +- source/future.tex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/declarations.tex b/source/declarations.tex index 50568790d0..7cbe7fb501 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3688,7 +3688,7 @@ A \grammarterm{parameter-declaration-clause} of the form \grammarterm{parameter-declaration-list} \tcode{...} -is deprecated. +is deprecated\iref{depr.ellipsis.comma}. \begin{example} The declaration \begin{codeblock} diff --git a/source/future.tex b/source/future.tex index 27c4658f9b..9a56e3320e 100644 --- a/source/future.tex +++ b/source/future.tex @@ -120,7 +120,7 @@ A \grammarterm{parameter-declaration-clause} of the form \grammarterm{parameter-declaration-list} \tcode{...} -is deprecated. +is deprecated\iref{dcl.fct}. \begin{example} \begin{codeblock} void f(int...); // deprecated