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