OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / partial5.C
1 // PR c++/33964
2
3 template<typename T>
4 struct X { };
5
6 template<typename T>
7 struct X<typename T::foo> { }; // { dg-error "not used|T" }
8
9 template<int N>
10 struct X<int[N]> {}; // okay
11
12
13 template<typename T, typename T::foo V>
14 struct Y { };
15
16 template<typename T, typename U, U v>
17 struct Y<T, v> { }; // { dg-error "not used|U" }
18
19
20 template<typename T, T V>
21 struct Z { };
22
23 template<typename T>
24 struct Z<T, (T)0> { }; // { dg-error "involves template parameter" }