Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C

raw
1 // PR c++/78948
2 // { dg-do compile { target c++17 } }
3
4 template <int T>
5 void sizeof_mismatch()
6 {
7 static_assert(T == 0, "sizeof mismatch");
8 }
9
10 int main()
11 {
12 if constexpr(sizeof(int*) == sizeof(char*))
13 ;
14 else
15 sizeof_mismatch<sizeof(int*)>();
16 }