// { dg-do compile } // Origin: Debian GCC maintainers // Wolfgang Bangerth // PR c++/16706: Dependent type calculation during access checking template struct B { B() throw() {} struct S { }; static int i; typedef unsigned short int dummy; }; template struct allocator: B<_Tp> { template struct rebind { typedef allocator<_Tp1> other; }; }; template struct X { typename allocator::template rebind::other i; typedef int* dummy; }; template class A { typedef typename X >::dummy dummy; template class XWrapper; }; template template struct A::XWrapper { XWrapper() {} X > x; }; template class A::XWrapper;