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