typename16.c

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

C
32
字号
// Build don't run:// Special g++ Options: -Wno-deprecatedstruct B {  typedef int I;};template <class T>struct D1 : public B {};template <class T>struct D2 : public D1<T> {  I i;  // WARNING - implicit typename};template <>struct D1<int> {  typedef double I;};template <class T>void f(T);template <>void f(double) {}int main(){  D2<int> d2i;  f(d2i.i);}

⌨️ 快捷键说明

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