extern "C" void abort (); template void f () { abort (); } template <> void f () { } template class C { friend void f (); public: void ff () { f (); } }; int main () { C c; c.ff(); }