Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/typedef24.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // Contributed by Dodji Seketeli <dodji@redhat.com> |
2 // Origin PR c++/42225 | |
3 // { dg-do compile } | |
4 | |
5 template<class T> | |
6 struct A | |
7 { | |
8 typedef T I; | |
9 }; | |
10 | |
11 template<class T, int> | |
12 struct B | |
13 { | |
14 typedef T TT; | |
15 typedef typename TT::I TT_I; | |
16 typedef A<TT_I> TA; | |
17 }; | |
18 | |
19 template<class T> | |
20 void | |
21 foo() | |
22 { | |
23 typedef T TT; | |
24 typedef typename TT::I TT_I; | |
25 typedef A<TT_I> TA; | |
26 } | |
27 | |
28 int | |
29 main() | |
30 { | |
31 foo<A<int> >(); | |
32 } | |
33 |