template struct B { }; template B f(); class A { static const int I = 42; template friend B f(); }; int main() { f(); }