Uhmm... that sounds like it is semantically nonsensical.
You should not be able to create pointers to non-static member functions of a class.
ASSUMING that the compiler let you do this (it is possible that It might let you create the function pointer anyway even though they are non-static) you can't call them without passing in the this pointer.
Non-static member (Static member functions don't need the this pointer because the location of the unique static instance is fixed in memory) functions always have a this pointer that needs to be passed in by the compiler implicitly, when you call the functions from a table your not passing in the *this pointer to the CFoo instance. If the compiler allows you to explicitly pass in CFoo as the first argument to the functions as you call from that table then it might make sense semantically.
Semantics of the language isn't everything though. The compiler may expressly forbid you from creating those function pointers cuz it's just sorta fubar.
I don't do C++ anymore, anyway why the heck do you want to do this? There has to be another more elegant way, you could just pass a pointer to the instance of CFoo itself to the right spot.
__________________
"It better be funny"
|