22<feed xmlns =" http://www.w3.org/2005/Atom" >
33 <title >cpprefjp - C++日本語リファレンス</title >
44 <link href =" https://cpprefjp.github.io" />
5- <updated >2026-09-16T01:56:08.415564 </updated >
6- <id >296840ba-a07a-4f57-a37e-212c3c4d2ac0 </id >
5+ <updated >2026-09-16T03:45:13.256148 </updated >
6+ <id >bd08a260-002e-48f2-8696-11b3bec581e0 </id >
77
88
9+ <entry >
10+ <title >is_within_lifetime -- is_within_lifetime : GCCで実装された</title >
11+ <link href =" https://cpprefjp.github.io/reference/type_traits/is_within_lifetime.html" />
12+ <id >70387dac8faa3ca84e2a54fd51a72ca28e8d0ef6:reference/type_traits/is_within_lifetime.md</id >
13+ <updated >2026-09-16T12:43:04+09:00</updated >
14+
15+ <summary type =" html" >< pre>< code> diff --git a/reference/type_traits/is_within_lifetime.md b/reference/type_traits/is_within_lifetime.md
16+ index ea38c8794..93e92d1e1 100644
17+ --- a/reference/type_traits/is_within_lifetime.md
18+ +++ b/reference/type_traits/is_within_lifetime.md
19+ @@ -90,9 +90,9 @@ int main() {
20+ - C++26
21+
22+ ### 処理系
23+ -- [Clang](/implementation.md#clang): 20 [mark noimpl]
24+ -- [GCC](/implementation.md#gcc): 14 [mark noimpl]
25+ -- [Visual C++](/implementation.md#visual_cpp): 2022 Update 10 [mark noimpl]
26+ +- [Clang](/implementation.md#clang): 23 [mark noimpl]
27+ +- [GCC](/implementation.md#gcc): 17 [mark verified]
28+ +- [Visual C++](/implementation.md#visual_cpp): 2026 Update 6 [mark noimpl]
29+
30+ ## 参照
31+ - [P2641R4 Checking if a `union` alternative is active](http://open-std.org/jtc1/sc22/wg21/docs/papers/2023/p2641r4.html)
32+ < /code>< /pre> </summary >
33+
34+ <author >
35+ <name >Akira Takahashi</name >
36+ <email >faithandbrave@gmail.com</email >
37+ </author >
38+ </entry >
39+
940 <entry >
1041 <title >atomic_store_or -- atomic_store_or : 出力の間違いを修正</title >
1142 <link href =" https://cpprefjp.github.io/reference/atomic/atomic_store_or.html" />
@@ -421,72 +452,4 @@ index 5a0099eb4..4035585fa 100644
421452 </author >
422453 </entry >
423454
424- <entry >
425- <title >コンパイル時アサート [N1720] -- if constexpr周りの整理 #1260</title >
426- <link href =" https://cpprefjp.github.io/lang/cpp11/static_assert.html" />
427- <id >6b0724b0e03136e3503aef084ffadd8ac2c6b31b:lang/cpp11/static_assert.md</id >
428- <updated >2026-09-15T16:15:49+09:00</updated >
429-
430- <summary type =" html" >< pre>< code> diff --git a/lang/cpp11/static_assert.md b/lang/cpp11/static_assert.md
431- index 8787129d1..eb2c73cd8 100644
432- --- a/lang/cpp11/static_assert.md
433- +++ b/lang/cpp11/static_assert.md
434- @@ -38,7 +38,7 @@ static_assert(定数式, 文字列リテラル);
435- - この宣言は、名前空間スコープ、ブロックスコープ、メンバ宣言といった場所で記述できる
436- - 定数式が真であると評価された場合は何も効果がない。定数式が偽であると評価された場合は、指定された文字列リテラルを含む診断メッセージがコンパイラによって問題報告される。ただし、基本ソース文字集合に含まれない文字集合は、診断メッセージに表示することはコンパイラに要求されない
437- - `static_assert`宣言では、新たな型やオブジェクトは宣言しない。また、実行時にサイズや時間コストは発生しない
438- -- (CWG 2518が適用された環境): template文(もしくは適切な特殊化や[C++17 constexpr if 文](/lang/cpp17/if_constexpr.md)の中の文)が実際にインスタンス化されるまで、`static_assert`文の宣言は遅延される。
439- +- (CWG 2518が適用された環境): 失敗する`static_assert`宣言があっても、その宣言自体が実体化されない限りコンパイルエラーにはならない。テンプレートが実体化されない場合と、[C++17 constexpr if 文](/lang/cpp17/if_constexpr.md)の廃棄文に含まれる場合がこれに該当する。
440- - [C++17 constexpr if 文](/lang/cpp17/if_constexpr.md)の解説を参照
441-
442- ## 例
443- < /code>< /pre> </summary >
444-
445- <author >
446- <name >Akira Takahashi</name >
447- <email >faithandbrave@gmail.com</email >
448- </author >
449- </entry >
450-
451- <entry >
452- <title >constexpr if 文 [P0292R2] -- if constexpr周りの整理 #1260</title >
453- <link href =" https://cpprefjp.github.io/lang/cpp17/if_constexpr.html" />
454- <id >6b0724b0e03136e3503aef084ffadd8ac2c6b31b:lang/cpp17/if_constexpr.md</id >
455- <updated >2026-09-15T16:15:49+09:00</updated >
456-
457- <summary type =" html" >< pre>< code> diff --git a/lang/cpp17/if_constexpr.md b/lang/cpp17/if_constexpr.md
458- index d18207ac8..b5a3ae3cc 100644
459- --- a/lang/cpp17/if_constexpr.md
460- +++ b/lang/cpp17/if_constexpr.md
461- @@ -102,7 +102,7 @@ int main()
462-
463- ### `static_assert`宣言に関する例外
464-
465- -後に述べる2段階名前探索に関する注意点とは関係なく、C++23以降、もしくはCWG 2518が適用された環境においては、template文(もしくは適切な特殊化や`constexpr if`文の中の文)が実際に実体化されない限り、`static_assert`宣言による失敗は無視される。
466- +後に述べる2段階名前探索に関する注意点とは関係なく、C++23以降、もしくはCWG 2518が適用された環境においては、失敗する`static_assert`宣言があっても、その宣言自体が実体化されない限りコンパイルエラーにはならない。テンプレートが実体化されない場合と、`constexpr if`文の廃棄文に含まれる場合がこれに該当する。
467-
468- ```cpp example
469- #include & lt;cstdint& gt;
470- @@ -149,11 +149,11 @@ int main()
471- }
472- ```
473-
474- -なぜならば廃棄文はテンプレートの実体化を防ぐ (依存名の検証をしない) だけで、非依存名は検証されるからである。この例の[`static_assert`](/lang/cpp11/static_assert.md)に渡す条件式はテンプレートパラメータに依存していないので、テンプレートの宣言時に検証され、エラーとなる。
475- +なぜならば廃棄文はテンプレートの実体化を防ぐ (依存名の検証をしない) だけで、非依存名は検証されるからである。この例の[`static_assert`](/lang/cpp11/static_assert.md)に渡す条件式はテンプレートパラメータに依存していないので、テンプレートの定義時に検証され、エラーとなる。
476-
477- #### CWG 2518が適用されていない環境での回避策
478-
479- -言い換えれば`static_assert`に渡す条件式が依存名ならばテンプレートの宣言時に検証されず、テンプレート実体化まで評価を遅らせることができる。
480- +言い換えれば`static_assert`に渡す条件式が依存名ならばテンプレートの定義時に検証されず、テンプレート実体化まで評価を遅らせることができる。
481-
482- ```cpp example
483- #include & lt;type_traits& gt;
484- < /code>< /pre> </summary >
485-
486- <author >
487- <name >Akira Takahashi</name >
488- <email >faithandbrave@gmail.com</email >
489- </author >
490- </entry >
491-
492455</feed >
0 commit comments