Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions content/oxford-variadic-comma.md
Original file line number Diff line number Diff line change
@@ -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
```
2 changes: 2 additions & 0 deletions features_cpp26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down