// Build don't link: template class D { public: int f(); }; template int D::f() { return sizeof(T); } template class D,class E> class C { D d; // ERROR - D is a template public: int f(); }; template class D,class E> int C::f() { return d.f(); // ERROR - d not properly declared } int main() { C c; c.f(); }