// Build then link: // Special g++ Options: -frepo -Werror // Submitted by Melissa O'Neill // the vtable of Foo wouldn't be generated template struct Foo { virtual void foo() {} }; template struct Bar { void bar(); }; template void Bar::bar() { Foo oof; } int main () { Bar rab; rab.bar(); }