File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ int main()
9494
9595### ` static_assert ` 宣言に関する例外
9696
97- 後に述べる2段階名前探索に関する注意点とは関係なく、C++23以降、もしくはCWG 2518が適用された環境においては、template文(もしくは適切な特殊化や` constexpr if ` 文の中の文)が実際にインスタンス化されない限り 、` static_assert ` 宣言による失敗は無視される。
97+ 後に述べる2段階名前探索に関する注意点とは関係なく、C++23以降、もしくはCWG 2518が適用された環境においては、template文(もしくは適切な特殊化や` constexpr if ` 文の中の文)が実際に実体化されない限り 、` static_assert ` 宣言による失敗は無視される。
9898
9999``` cpp example
100100#include < cstdint>
@@ -109,7 +109,7 @@ void f(T t) {
109109
110110void g(std::int8_t c) {
111111 std::int32_t n = 0;
112- f(n); // OK: nはstd::int32_t型なので` use(t); ` のほうがインスタンス化されるために 、static_assert宣言の失敗は無視される。
112+ f(n); // OK: nはstd::int32_t型なので` use(t); ` のほうが実体化されるために 、static_assert宣言の失敗は無視される。
113113 f(c); // error: cはstd::int8_t型なので、static_assert宣言は失敗し、"must be 32bit"とコンパイラが診断メッセージを出力する
114114}
115115```
You can’t perform that action at this time.
0 commit comments