summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/partial5.C
blob: aa32e3b8a419cd5aa1bc982c7cd83edcab0c778e (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 used|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 used|U" }


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

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