aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/partial5.C
blob: 979e4c62bf6b966e64615164c2cbff273b435bc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/33964

template<typename T>
struct X { };

template<typename T>
struct X<typename T::foo> { }; // { dg-error "not deducible|T" }

template<int N>
struct X<int[N]> {}; // okay


template<typename T, typename T::foo V>
struct Y { };

template<typename T, typename U, U v>
struct Y<T, v> { }; // { dg-error "not deducible|U" }


template<typename T, T V>
struct Z { };

template<typename T>
struct Z<T, (T)0> { }; // { dg-error "involves template parameter" }