I have a class hierarchy and want to get rid of virtual method calls overhead using CRTP pattern. How to do this for my example classes, is it doable ?
class A
{
public:
virtual ~A();
virtual void foo();
};
class B : public A
{
public:
virtual ~B();
virtual void foo();
};
class C : public B
{
public:
virtual ~C();
virtual void foo();
};