derived2.c

来自「this is a gcc file, you can download it 」· C语言 代码 · 共 36 行

C
36
字号
// Build don't link:// Special g++ Options:template <typename T>void f(T);template <>void f(int) {}struct B {  typedef int I;};template <typename T> struct D1 : virtual public B {  typedef T I;};template <typename T> struct D : virtual public B, public D1<T>{  void g()    {      I i;      f(i);    }};intmain(){  D<double> d;  d.g();}

⌨️ 快捷键说明

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