I\'m currently using GCC 4.4, and I\'m having quite the headache casting between void* and a pointer to member function. I\'m trying to write an easy-to-use li
It is possible to convert pointer to member functions and attributes using unions:
// helper union to cast pointer to member
template
union u_ptm_cast {
memberT classT::*pmember;
void *pvoid;
};
To convert, put the source value into one member, and pull the target value out of the other.
While this method is practical, I have no idea if it's going to work in every case.