fvisibility-inlines-hidden-3.c

来自「用于进行gcc测试」· C语言 代码 · 共 31 行

C
31
字号
/* { dg-do compile } *//* { dg-require-visibility "" } *//* { dg-options "-fvisibility-inlines-hidden" } *//* { dg-final { scan-not-hidden "_ZN1IIiE3fooEv" } } *//* { dg-final { scan-not-hidden "_ZN1OIiE3fooEv" } } *//* { dg-final { scan-hidden "_ZN1S3fooEv" } } */template <class T>struct O {  static inline void foo() { }};template void O<int>::foo();template <class T>struct I {  static inline void foo() { }};extern template void I<int>::foo();struct S {  static inline void foo() { }};void bar() {  I<int>::foo();  O<int>::foo();  S::foo();}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?