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