I have a problem with the following situation:
template<class T>
class A {
public: virtual int f() { return 1; }
};
class BaseA : public A<BaseA> {};
class DerivedA : public BaseA, public A<DerivedA> {};
and when I do:
BaseA* b1 = new DerivedA;
b1->f();
it calls A<BaseA>::f()
instead of A<DerivedA>::f()
and I don't know how to fix it.