我想为具有模板作为参数的方法签名创建函数指针
Template<class T>
typedef int (*computeSizeFunc)(T data);
Run Code Online (Sandbox Code Playgroud)
我试过了,这是错误
error: template declaration of 'typedef'
typedef int (*computeSizeFunc)(T data).
Run Code Online (Sandbox Code Playgroud)
这是我尝试为其编写函数指针的方法签名
template<class T>
int getSize (T data)
Run Code Online (Sandbox Code Playgroud)