Hello,
I have base class and a derived class if I want to use bost::bind in an algorithm to call a virtual function that is declared in the base class I have two options:
struct Base { virtual void Go(){}};
struct Derived:Base { virtual void Go(){}};
Derived d;
// Option one
boost::bind(&Base::Go, _1) (d);
// Option two
boost::bind(&Derived::Go, _1) (d);
From my experience both options will call Derived::Go, which what I want. Is it valid to use Base::Do (it's more general, so it's easier to use the same algorithms on everything, just by changing container names)?
Thanks.