Ido*_*dov 6 c++ templates compiler-errors
我试图在C++中声明一个模板函数指针.
template <class T>
class MyClass
{
public:
typedef const unsigned char* (T::*MyTemplatedEvent)(unsigned long &myParameter);
};
Run Code Online (Sandbox Code Playgroud)
但由于某种原因,我不断收到此错误:
'T':后跟'::'时必须是类或命名空间
谁能说出我做错了什么?
编译器应该知道T是一个类.它说的高于MyClass声明......