Boost logo

Boost Users :

Subject: [Boost-users] Determine base class member function pointer for member function pointer of derived class.
From: Siegfried Kettlitz (siegfried.kettlitz_at_[hidden])
Date: 2008-12-23 14:22:28


Hello,

is there an automatic way to determine the base class member function
pointer &base::fn from the derived member function pointer
&derived::fn?

Or do you know that there is no way to do this with current c++?

It should work like this:

class base {
  public:
    virtual void fn( void );
};
class derived : public base {
  public:
    void fn( void );
}

main() {
  base_pointer = get_base_pointer( &derived::fn );
}

Thanks,
Siegfried


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net