instantiate4.c
来自「用于进行gcc测试」· C语言 代码 · 共 32 行
C
32 行
// { dg-do link }// { dg-options "-frepo -Werror" }// { dg-require-host-local "" }// Build then link:// Submitted by Melissa O'Neill <oneill@cs.sfu.ca>// the vtable of Foo<int> wouldn't be generatedtemplate <typename A>struct Foo { virtual void foo() {}};template <typename A>struct Bar { void bar();};template <typename A> void Bar<A>::bar() { Foo<A> oof;}int main () { Bar<int> rab; rab.bar();}// { dg-final { cleanup-repo-files } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?