File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 317317| P3068R6: [ 定数評価での例外送出を許可] ( /lang/cpp26/allowing_exception_throwing_in_constant-evaluation.md ) | 定数式の文脈での例外の送出と捕捉を許可 | | | | |
318318| P2865R6: [ 非推奨だった配列の比較を削除] ( /lang/cpp26/remove_deprecated_array_comparisons.md.nolink ) | C++20で非推奨となっていた配列比較を削除 | 15 | 20 | | |
319319| P1061R10: [ 構造化束縛でパックを導入できるようにする] ( /lang/cpp26/structured_bindings_can_introduce_a_pack.md ) | タプルを分解する際に複数の変数をパックとして宣言できるようにする。` auto [a, ...xs] = f(); ` | | | | |
320- | P3176R0: [ 先行するカンマのない省略記号を非推奨化] ( /lang/cpp26/the_oxford_variadic_comma.md.nolink ) | ` void f(int, ...); ` はOK。` void f(int...); ` は非推奨 | 15 | 20 | | |
320+ | P3176R0: [ 先行するカンマのない省略記号を非推奨化] ( /lang/cpp26/the_oxford_variadic_comma.md ) | ` void f(int, ...); ` はOK。` void f(int...); ` は非推奨 | 15 | 20 | | |
321321| P3074R7: [ 共用体をトリビアルに未初期化できるようにする] ( /lang/cpp26/trivial_unions.md.nolink ) | ` constexpr ` での` union U { T storage[N]; }; ` を許可し、未初期化にできるようにする | | | | |
322322| P2900R14: [ 契約プログラミングをサポートする] ( /lang/cpp26/contracts.md ) | 関数の事前条件、事後条件、不変条件を記述できるようにする | | | | |
323323| P2841R7: [ コンセプトと変数テンプレートにテンプレートテンプレートパラメータのサポートを追加] ( /lang/cpp26/concept_and_variable-template_template-parameters.md.nolink ) | テンプレート引数をあとで指定するテンプレートテンプレートパラメータを、コンセプトと変数テンプレートでも使用できるようにする | | | | |
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ C++26とは、2026年中に改訂される予定の、C++バージョンの通
110110| 言語機能 | 説明 |
111111| ----------| ------|
112112| [ 非推奨だった配列の比較を削除] ( /lang/cpp26/remove_deprecated_array_comparisons.md.nolink ) | C++20で非推奨となっていた配列比較を削除 |
113- | [ 先行するカンマのない省略記号を非推奨化] ( /lang/cpp26/the_oxford_variadic_comma.md.nolink ) | ` void f(int, ...); ` はOK。` void f(int...); ` は非推奨 |
113+ | [ 先行するカンマのない省略記号を非推奨化] ( /lang/cpp26/the_oxford_variadic_comma.md ) | ` void f(int, ...); ` はOK。` void f(int...); ` は非推奨 |
114114
115115
116116## ライブラリ更新の概要
Original file line number Diff line number Diff line change 1+ # 先行するカンマのない省略記号を非推奨化 [ P3176R0]
2+ * cpp26[ meta cpp]
3+
4+ <!-- start lang caution -->
5+
6+ このページはC++26に採用される見込みの言語機能の変更を解説しています。
7+
8+ のちのC++規格でさらに変更される場合があるため関連項目を参照してください。
9+
10+ <!-- last lang caution -->
11+
12+ ## 概要
13+ C++26では、カンマ後ではない「` ... ` 」の使用を非推奨化する。
14+
15+ ``` cpp
16+ template <class ... Ts>
17+ void a(Ts...); // OK, 関数テンプレートのパラメータパック
18+
19+ void b(auto...); // OK, 関数テンプレートのパラメータパック
20+
21+ void c(int, ...); // OK, Cとの互換性もある
22+ void d(...); // OK, Cとの互換性もある
23+
24+ void e(int...); // C++23: OK , C++26:非推奨, C17:不適格
25+ void f(int x...); // C++23: OK , C++26:非推奨, C17:不適格
26+
27+ void g(int... args); // 不適格、あいまい
28+ ```
29+
30+ この構文は、C言語 (C89) の互換性としてC++98で導入されたが、C17では不適格となっている。C言語との互換性としてこの構文を維持する必要がなくなったため、非推奨となった。
31+
32+
33+ ## 参照
34+ - [P3176R0 The Oxford variadic comma](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3176r0.html)
You can’t perform that action at this time.
0 commit comments