I want to xor my instance pointer (size_t) with some sort of value from a member function pointer from it, but the compiler doesn't like
reinterpret_cast<std::size_t>(MemberFunctionPointer) which otherwise works fine on a regular function pointer. Is there any way I can pull some sort of unique value from a member function pointer to xor with the object it's from for a hash?
I suppose this is me being ignorant about the underlying difference between a standard function pointer and a member function pointer... I will do some more research on that. However, I would still like some way to get some sort of "size_t" value from a member function pointer - or any kind of value I can turn into a size_t and use to create a unique hash value.
static, then I'm fairly certain that you can't achieve what you want without diving deep into how your compiler implements member functions.if (typeid(x) == typeid(some_class)) { .. }) then the member functions are the same for the types .. ?