// Build don't link: template struct S1 { friend bool f<>(const S1&); typedef T X; }; template struct S2 { }; template struct S2 > { typedef typename S1::X Y; }; template bool f(T); template typename S2 >::Y f(const S1&); template struct S1;