Let’s say I have the classes:
class Base{};
class A: public Base{
int i;
};
class B:public Base{
bool b;
};
And now I want to define a templated class:
template < typename T1, typename T2 >
class BasePair{
T1 first;
T2 second;
};
But I want to define it such that only decendants of class Base can be used as templateparameters.
How can I do that?
More exactly: