i want a specialize template in a pointer-to-member-function case. Is there a way to detect this? right now i declare struct isPtrToMemberFunc, then add an extra template (class TType=void) to each class (right now just 1) and specialize the extra template to see if its isPtrToMemberFunc. Is there a way to detect this automatically? if not is my current method the best solution?
i want a specialize template in a pointer-to-member-function case. Is there a way to
Share
There is a way, but it includes that you repeat your specialization for each and every number of arguments and const/volatile modifiers for those member functions. An easier way to do that is to use
boost.functiontypeswhich does that for you:Grab it from here.