Member function traits
问题 I am writing a template class that wraps around member functions to reduce some calls - if some condition is true, the member function doesn't need to be called. The signature would look something like this template <typename MemFuncType, MemFuncType> class MemberWrapper; And I can specialize it thus: template <typename R, typename T, R T::* MemFunc> class MemberWrapper<R T::*, MemFunc>{}; I would also like to restrict the number of arguments of R T::* . How do I do this? The only solution I