Debian Codegraph @

gcc/testsuite/g++.dg/template/partial18.C

raw
1 // PR c++/96555
2
3 template<class T, int i>
4 struct X;
5
6 template<class T>
7 struct X<T, sizeof(T)> {};
8
9 X<int, sizeof(int)> x1;
10 X<int, sizeof(int)+1> x2; // { dg-error "incomplete" }
11
12
13 struct A { int x; } a;
14 template<int, int> struct B;
15 template<int y>
16 struct B<y, sizeof(a.x)> { };
17
18 B<0, sizeof(int)> b1;
19 B<0, sizeof(int)+1> b2; // { dg-error "incomplete" }