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

template<class T>
struct A
{
    typedef T I;
};

template<class T, int>
struct B
{
    typedef T TT;
    typedef typename TT::I TT_I;
    typedef A<TT_I> TA;
};

template<class T>
void
foo()
{
    typedef T TT;
    typedef typename TT::I TT_I;
    typedef A<TT_I> TA;
}

int
main()
{
    foo<A<int> >();
}