// Contributed by Dodji Seketeli // Origin: PR c++/42225 // { dg-do compile } struct A { typedef int TI; }; template struct S0 { int i; }; template struct S1 { typedef _T T; typedef typename T::TI TTI; typedef S0 TT0; typedef S0 TT1; }; template void foo(const T&) { typedef typename T::TI TTI; typedef S0 TT1; typedef S0 TT2; } int main() { A a; foo (a); }