Hi,
instead of writing this
SomeFunction<Class>::Bind<&Class::MemberFunction>(this);
I want to provide an easier way to call "SomeFunction".
I have one solution using a macro like this:
GET_EXAMPLE(Class, &Class::MemberFunction, this);
//...
#define GET_EXAMPLE(ClassName, MemberFunctionPointer, InstancePointer) \
(SomeFunction<ClassName>::Bind<MemberFunctionPointer>(InstancePointer))
But in order to avoid the use of this macro I'd like to do something like the following. The problem is that I get the error: template parameter 'T_MEMBER_FUNCTION' : 'MemberFunctionPointer' : a local variable cannot be used as a non-type argument
//...
GetExample(&Class::MemberFunction, this));
//...
template<class T_CLASS>
inline static void GetExample(void (T_CLASS::*MemberFunctionPointer)(), T_CLASS* InstancePointer)
{
SomeFunction<T_CLASS>::Bind<MemberFunctionPointer>(InstancePointer);
}
Any solutions to this problem?
Thanks,
Mirco