I wonder if there is any elegant way (like this ) to check that the template argument is derived from this class? Generally:
template<class A, class B> class MyClass {
The solution presented in another question only works when B inherits from A as public:
class B: public A
however, I would prefer not to have such a restriction:
class A{}; class B : public A{}; class C : private A{}; class D; MyClass<A,B>
Thanks in advance!
Serge source share