summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/defarg6.C
blob: f5f7b7b2262f19400237f6fe8432dfefcc2cb297 (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
25
26
27
28
// { dg-do assemble  }
// { dg-options "-std=gnu++98" }

template <class T>
struct C {
  template <class U>
  void f(U); // OK

  template <class V = int>
  struct I {}; // OK

  template <class W = int>
  void h(W); // { dg-error "" } default argument
  
  template <class Y>
  void k(Y);
};

template <class T>
template <class U = double>
void C<T>::f(U) {} // { dg-error "" } default argument

template <class X = void*>
void g(X); // { dg-error "" } default argument

template <class T = double>
template <class Y>
void C<T>::k(Y) {} // { dg-error "" } default argument