From 5cde49b93dec069a8d4912736b9dfa31e5ff5da2 Mon Sep 17 00:00:00 2001 From: Eisenwave Date: Sun, 24 Nov 2024 05:17:27 +0100 Subject: [PATCH] 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 b3122d3db8..938f45c7cc 100644 --- a/source/declarations.tex +++ b/source/declarations.tex @@ -3602,8 +3602,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} @@ -3659,9 +3661,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 4eab361bf9..fd726261f3 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.array.comp]{Array comparisons}