1*67e74705SXin Li // RUN: %clang_cc1 -std=c++1y -verify %s 2*67e74705SXin Li // expected-no-diagnostics 3*67e74705SXin Li 4*67e74705SXin Li template<typename T> struct A { 5*67e74705SXin Li template<typename U> struct B; 6*67e74705SXin Li template<typename U> struct B<U*>; 7*67e74705SXin Li }; 8*67e74705SXin Li template<typename T> template<typename U> struct A<T>::B<U*> {}; 9*67e74705SXin Li template struct A<int>; 10*67e74705SXin Li A<int>::B<int*> b; 11*67e74705SXin Li 12*67e74705SXin Li 13*67e74705SXin Li template<typename T> struct B { 14*67e74705SXin Li template<typename U> static const int var1; 15*67e74705SXin Li template<typename U> static const int var1<U*>; 16*67e74705SXin Li 17*67e74705SXin Li template<typename U> static const int var2; 18*67e74705SXin Li }; 19*67e74705SXin Li template<typename T> template<typename U> const int B<T>::var1<U*> = 1; 20*67e74705SXin Li template<typename T> template<typename U> const int B<T>::var2<U*> = 1; 21*67e74705SXin Li template struct B<int>; 22*67e74705SXin Li int b_test1[B<int>::var1<int*>]; 23*67e74705SXin Li int b_test2[B<int>::var2<int*>]; 24