I have a class hierarchy where I want to introduce a method template that would behave like if it was virtual. For example a simple hierarchy:
class A { vi
Is there any common code you could extract and make virtual?
class A { virtual ~A() {} template void method(T &t) { ... DoSomeWork(); ... } virtual void DoSomeWork() {} }; class B : public A { virtual void DoSomeWork() {} };