Suppose I have a base class:
struct A{
virtual void foo() = 0;
};
And then suppose I have a derived class like this:
struct B : public virtual A{
void foo(){ /*something*/ }
};
But I also want a copy of B
like this (note that it is identical in every way except for not inheriting virtually):
struct B : public A{
void foo(){ /*same something*/ }
};
Is there a some sort of template sorcery to do this with just one definition.
Something like this??
struct B : public InheritanceHelper<A> {
void foo(){ /*same something*/ }
};