summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/error15.C
blob: b7c7bc8ca47da71d7c2641b59c6ab126d0218b26 (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++/16929

template <class T>
class A {
  int x;
};

template <class T>
class B {
protected:
    
  A<T> a; // { dg-error "" }
    
  void f(const A<T> * a1 = &a); // { dg-error "this location" }
    
  void g(void);
};

template <class T>
void B<T>::g(void) {
  f(); // { dg-error "default argument" }
}

template class B<long>;