I just started on C++ so sorry if this is a newbie-ish question. I searched all over the web and didn't find anything about this. In fact I wasn't even sure how to formulate my search...
I saw this code somewhere:
template <class T> struct SomeStruct { SomeStruct() {} }; And later, this:
int main() { SomeStruct<void (Foo::*)(int test)> mStruct; } The above compiles just fine.
So if I understood it correctly, "void (Foo::*)(int test)" is a function pointer that points to some function in Foo taking a int as argument and returning void.
How can that be a legal argument for the "class T" parameter?
Any help would be appreciated.