MostDerived

Returns the type from TList that is the most derived from type T. If none are found, T is returned.

template MostDerived (
T
TList...
) {}

Examples

class A { }
class B : A { }
class C : B { }
alias Types = AliasSeq!(A, C, B);

MostDerived!(Object, Types) x;  // x is declared as type C
static assert(is(typeof(x) == C));
Suggestion Box / Bug Report