OSDN Git Service

PR c++/39055
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / spec14.C
1 // { dg-do compile }
2 // Origin: <weissr at informatik dot uni-tuebingen dot de>
3 // PR c++/3671: Non-type enum parameters must not be converted
4
5 enum T1 {a};
6 enum T2 {b};
7
8 struct Y {
9   template <T1 i> void foo() {}
10   template <T2 i> void foo() {}
11 };
12
13 struct Z {
14   template <T1 i> void foo() {}
15 };
16
17 template void Y::foo<b> ();
18 template void Z::foo<b> ();   // { dg-error "" }