I’m trying to declare a template function pointer in C++.
template <class T>
class MyClass
{
public:
typedef const unsigned char* (T::*MyTemplatedEvent)(unsigned long &myParameter);
};
but for some reason I keep getting this error:
‘T’: must be a class or namespace when followed by ‘::’
Can somebody tell what I’m doing wrong?
the compiler should know that T is a class. It says so above the MyClass declaration…
I’m guessing it’s because I try to create “MyClass” of template which is a pointer or primitive which the compiler know can’t have and function pointer associated with them…