partial template specialization for non type member function pointer values
When you create a partial specialization for a template, you have to provide template argument(s) to the primary specialization that signal when your partial specialization should be used. The primary template for adap
takes a non-type template parameter: a value. So your partial specialization needs to provide a value.
Which it doesn't. Fptr
is not a value. I'm guessing that you intend it to be the name of a parameter. But you're not providing a parameter; you're providing an argument, one that fits the corresponding template parameter defined in the primary template. That parameter being an NTTP, you must provide a value. The idea being that when a user provides that value, your specialization will take over.
auto
-deduced NTTP parameters were added so that you could avoid having to do something like this: template<typename T, T value>
. Your specialization needs to basically bring this back. Your template header should take the component types of a member pointer (return type, class type, and arguments) and an NTTP value which is a member pointer type that uses these components. You then pass that value to the primary template:
template <auto T>
struct adap : std::true_type {};
template <typename Ret, typename Class, typename ...Args, Ret(Class::*value)(Args...)>
struct adap<value> : std::false_type {};