aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/typename16.C
blob: 51a8765e9ac157e9acb23502ac87f4aee08861b1 (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
// Build don't run:
// Special g++ Options:

struct B {
  typedef int I;
};

template <class T>
struct D1 : public B {
};

template <class T>
struct D2 : public D1<T> {
  I i;
};

template <>
struct D1<int> {
  typedef double I;
};

template <class T>
void f(T);
template <>
void f(double) {}

int main()
{
  D2<int> d2i;
  f(d2i.i);
}