1 namespace ns {
2   template<typename T>
3   struct Foo {
4     template<typename U> struct Bar;
5   };
6 
7   template<typename T>
8   template<typename U>
9   struct Foo<T>::Bar {
10     template<typename V> struct Baz;
11   };
12 
13   template<typename T>
14   template<typename U>
15   template<typename V>
16   struct Foo<T>::Bar<U>::Baz {
17     Foo<T> chokes;
18     ns::Foo<T> works;
19   };
20 }
21