1 // Build don't link: 2 3 template <class T> 4 struct S1 { 5 typedef T X; 6 friend bool f<>(const S1&); 7 }; 8 9 template <class T> 10 struct S2 { 11 }; 12 13 template <class T> 14 struct S2<S1<T> > { 15 typedef typename S1<T>::X Y; 16 }; 17 18 template <class T> 19 bool f(T); 20 21 template <class T> 22 typename S2<S1<T> >::Y 23 f(const S1<T>&); 24 25 template struct S1<int>; 26