// Build don't link: template class a { public: friend void foo<>( a& thea ); private: T amember; }; template void foo( a& thea ) { thea.amember = 0; } template class a;