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