This is likely a stupid question, but I can't figured out by myself how to pass a pointer to a member function of a templatised class in its own template parameters.
More clearly:
I would like to have this to work out:
template <typename T, T test::* PtrToMember>
class test{
T a;
T b;
GetValue(){
return this::*PtrToMember;
}
}
which the compiler won't accept.
The problem is that the pointer to member type should be a sort of infinite recursion with the first line be something like:
template<typename T, T test<T,... recursion...
because test has a parameter that use itself its parameters.
Any brilliant idea of how to make this work?