diff --git a/content/oxford-variadic-comma.md b/content/oxford-variadic-comma.md new file mode 100644 index 0000000..f7671d3 --- /dev/null +++ b/content/oxford-variadic-comma.md @@ -0,0 +1,28 @@ +--- +execute: false +--- + +## What It Does + +This proposal makes use of a variadic ellipsis (`...`) deprecated, +if it is not separated by a comma from previous parameters. + +## Why It Matters + +Without a separating comma, +users can confuse whether `...` refers to a parameter pack +or to "C-style" variadic arguments. +The lack of a comma also prevents using syntax such as `int...` for new features, +without changing the meaning of existing code. + +## Example + +```cpp +void f(int...); // deprecated +void g(int, ...); // OK, also valid in C +void h(...); // OK, also valid in C + +void i(auto...); // OK, declares a function parameter pack +void j(auto......); // deprecated +void k(auto..., ...); // OK +``` diff --git a/features_cpp26.yaml b/features_cpp26.yaml index 78a0e10..892ab87 100644 --- a/features_cpp26.yaml +++ b/features_cpp26.yaml @@ -909,6 +909,8 @@ features: - desc: "The Oxford variadic comma" paper: P3176 support: [GCC 15, Clang 20] + summary: "Variadic ellipsis parameters (`...`) without a separating comma are deprecated, such as `int...`." + content: oxford-variadic-comma.md - desc: "Retiring niebloids" paper: P3136