summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/spec21.C
blob: 4107306d1d485ba84c19c82ca1cdfcde4760eec9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do assemble  }

template <class T> struct S {};
template <class T = int> struct S<T*> {}; // { dg-error "" } default argument

template <int I, int J> struct A {};
template <int I> struct A<I+5, I*2> {}; // { dg-error "" } argument involves parameter

template <class T, T t> struct C {};
template <class T> struct C<T, 1>;  // { dg-error "" } type depends on parameter
int i;
template <class T> struct C<T*, &i>; // { dg-error "" } type depends on parameter

template< int X, int (*array_ptr)[X] > class B {};
int array[5];
template< int X > class B<X,&array> { }; // { dg-error "" } type depends on parameter