1// { dg-do compile }
2// PR C++/29388
3// We used to ICE in is_ancestor because we would use int as the context of foo
4// but that is invalid.
5
6template<int> struct A
7{
8	  typedef int T;
9	    void foo();
10};
11
12template<int N> void A<N>::T::foo() {} // { dg-error "" }
13