vendredi 29 juillet 2016

Get base derived from

Suppose I have a class like so:

template<class T>
class Base{ };

Suppose I have another class like so:

template<class T, class Other>
class Derived :
  public virtual Base<T>, 
  public virtual OtherRandomClass<Other> 
{ };

Is there some way to create a template class to determine which version of Base (if any) a random class like Derived is derived from?

Aucun commentaire:

Enregistrer un commentaire