📰 2026-03-16 03:01 更新
🔸 C++26: The Oxford Variadic Comma / C++26: The Oxford Variadic Comma
🔗 C++26: The Oxford Variadic Comma
🔥 33 points
原文:
C++26 brings us a small but meaningful cleanup to the language: deprecating ellipsis parameters without a preceding comma. This change, proposed in P3176R1, aims to improve C compatibility, reduce confusion, and pave the way for future language features.The proposal’s name is a playful reference to the Oxford comma – that final comma before “and” in a list. Just as the Oxford comma clarifies lists in English, this proposal mandates a comma before the ellipsis in function parameters.The proble…
译文:
C + +26为我们带来了一个小而有意义的语言清理:弃用没有前逗号的省略号参数。P3176R1中提出的这一变化旨在提高C兼容性,减少混淆,并为未来的语言功能铺平道路。提案的名称是对牛津逗号的俏皮引用,牛津逗号是列表中“和”之前的最后一个逗号。正如牛津逗号用英文澄清列表一样,该提案要求在 函数参数中的省略号。
自动更新 · 正文抓取 · 双语翻译