
9 Jan
2009
9 Jan
'09
4:47 p.m.
Chris wrote:
As far as I know, no. If you find a true answer, please tell me. I had this problem once as well and looked into it on the newsgroups. There may be a non-portable way with the vtable and asm, but not generally. My suggestion would be to make a split
_nv function that does the call
struct B { virtual void f() { f_nv(); } void f_nv() {std::printf("B\n"); } }; struct D : B { virtual void f() { f_nv(); } void f_nv() { std::printf("D\n"); } };
And then bind _nv;
Or just create a new free function: inline void call_B_f(D &d) { d->B::f(); } boost::bind(&call_B_f, _1)(d); -- Jon Biggar jon@biggar.org jon@floorboard.com