summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/spec14.C
blob: 9b59565c465444392831eb3c6f556ccd39a71257 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// { dg-do compile }
// Origin: <weissr at informatik dot uni-tuebingen dot de>
// PR c++/3671: Non-type enum parameters must not be converted

enum T1 {a};
enum T2 {b};

struct Y {
  template <T1 i> void foo() {}
  template <T2 i> void foo() {}
};

struct Z {
  template <T1 i> void foo() {}
};

template void Y::foo<b> ();
template void Z::foo<b> ();   // { dg-error "" }