overload6.c

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

C
14
字号
// Check that foo<int> isn't resolved too early.template <class T> void foo(T*);template <class T, class U> void foo(T*, U) { }template <class T, class U> void bar(void (*)(T, U), U) { }int main() {  bar<int*>(&foo, 1);  bar<int*>(&foo<int>, 1);    bar<int*>(foo, 1);  bar<int*>(foo<int>, 1);  }

⌨️ 快捷键说明

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