aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/using27.C
blob: f1835e17161c8bd7dc739f51f33c9567b8684d2f (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++/37140

struct X
{
  typedef int nested_type;
};

template <class T>
struct A
{
  typedef X type;
};

template <class T>
struct B : A<T>
{
  using typename A<T>::type;
  typename type::nested_type x;
};

template <class T> 
struct C : B<T>
{
  using typename B<T>::type;
  typename type::nested_type y;
};

struct D : C<int>
{
  using C<int>::type;
  type::nested_type z;
};