summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/injected1.C
blob: 81873b498f9c1ac084dca2f17ebdb67ad9482e5b (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
29
30
31
32
33
// PR c++/13950, DR 176

template <class T> struct Base { }; // { dg-error "" } candidate

struct D1: Base<void>
{
  D1::Base* p1;
  D1::Base<double>* p2;
  Base *p3;
  Base<double>* p4;
};

struct D2: Base<void>, Base<void*>
{
  D2::Base* p1;			// { dg-error "" }
  D2::Base<double>* p2;
  Base *p3;			// { dg-error "" }
  Base<double>* p4;
};

template <class T>
struct D3: Base<T> {
  typename D3::Base* p1;
  typename D3::template Base<double>* p2;
};
template struct D3<void>;

template <class T>
struct D4: Base<T>, Base<T*> {
  typename D4::Base* p1;	// { dg-error "" }
  typename D4::template Base<double>* p2;
};
template struct D4<void>;	// { dg-message "instantiated" }