1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 // expected-no-diagnostics 3 4 template <class T> struct A { 5 static T cond; 6 7 template <class U> struct B { twiceA::B8 static T twice(U value) { 9 return (cond ? value + value : value); 10 } 11 }; 12 }; 13 foo()14int foo() { 15 A<bool>::cond = true; 16 return A<bool>::B<int>::twice(4); 17 } 18 19 namespace PR6376 { 20 template<typename T> 21 struct X { 22 template<typename Y> 23 struct Y1 { }; // 24 }; 25 26 template<> 27 struct X<float> { 28 template<typename Y> 29 struct Y1 { }; 30 }; 31 32 template<typename T, typename U> 33 struct Z : public X<T>::template Y1<U> { }; 34 35 Z<float, int> z0; 36 } 37