如何使用新的1 using
关键字声明函数类型?
我知道如何使用它来声明函数指针类型。例如,下面的 typedef:
typedef int (*int_to_int)(int);
似乎等同于以下 using 声明:
using int_to_int = int (*)(int);
如何对以下非指针 typedef 执行相同操作:
typedef int (int_to_intf)(int);
我的“删除 typedef 名称并将其放在后面using
”算法不起作用:
using int_to_intf_u = int ()(int); // nope, doesn't compile
一个金螺栓链接。
1至少对于像我这样仍然将“新”定义为“在 C++11 中引入”的可怜人来说。