aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/typedef18.C
blob: 8ea3c736a0a26f24a557d773b4538d27c5ac01f0 (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
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/40007
// { dg-do compile }

template<typename T>
struct x
{
  protected:
  typedef int type;
};

template<typename T>
struct y : public x<T>
{
  typename x<T>::type z;
};

template<>
struct y<void> : public x<void>
{
  typedef x<void>::type z;
};

template class y<int>;