I assume that std::hash's specialization for generic pointer types can be used for pointer-to-members, however I am unable to use it as such; instead, my compiler gives me an "incomplete type" error, which I assume means that is' not using the specialization of std::hash for pointers? What's going on here?
#include <functional>
struct foo{
void bar(int a){}
};
int main(){
std::hash<void (foo::*)(int)> hasher;
}
The error:
..\src\m.cpp:43:32: error: aggregate 'std::hash<void (foo::*)(int)> hasher' has incomplete type and cannot be defined