Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/enum7.C

raw
1 // { dg-do run }
2 template <int I>
3 int f()
4 {
5 enum E { a = I };
6
7 struct S {
8 int g() {
9 E e;
10 e = a;
11 return (int) e;
12 }
13 };
14
15 S s;
16
17 return s.g();
18 }
19
20
21 int main()
22 {
23 if (f<7>() != 7)
24 return 1;
25 if (f<-3>() != -3)
26 return 1;
27 return 0;
28 }