Che*_*ron 2 c++ templates using
目标是在模板对象中定义一个函数,其中void(void)作为原型.以下代码:
template <class T>
using ClassVoidFunctionPointer = void (T::*)(void);
class Scheduler {
public:
Scheduler(void);
~Scheduler(void);
template <class T>
void addTask(unsigned short interval, unsigned short delay,T templateClass,ClassVoidFunctionPointer classFunctionPtr );//For newer functions
...
}
Run Code Online (Sandbox Code Playgroud)
这给了我错误:
inc/scheduler.h:18:77: error: 'ClassVoidFunctionPointer' is not a type
Run Code Online (Sandbox Code Playgroud)
为什么我会收到此错误?
| 归档时间: |
|
| 查看次数: |
110 次 |
| 最近记录: |