I don't know, if this list is appropriate, as this is a general
C++-Question, but anyway...
I ran into some problems with the following Codepiece:
class Base
{
protected:
typedef void (Base::*FuncPtr)();
virtual void func();
};
class Derived: public Base
{
virtual void func();
Derived()
{
FuncPtr p = &Base::func;
}
};
g++ tells me, that i can't access it, because it is taken via Base. If
the method wouldn't be virtual, it could be referenced as "&Derived::func".
Currently the only solution to me seems to make func public - which is
not intended by design.
Are there other possibilities?