// Build don't link: template class B; template int f (B b) { return 37; } template class B { public: Y y; B() { y = 1; } }; int foo () { B bd; return f(bd); }