【发布时间】:2019-08-24 18:07:13
【问题描述】:
我想为以模板为参数的方法签名创建一个函数指针
Template<class T>
typedef int (*computeSizeFunc)(T data);
我试过了,这是错误
error: template declaration of 'typedef'
typedef int (*computeSizeFunc)(T data).
这是我尝试为其编写函数指针的方法签名
template<class T>
int getSize (T data)
【问题讨论】: