On Monday, 15 April 2019 at 22:45:59 UTC, Adam D. Ruppe wrote:
On Monday, 15 April 2019 at 05:20:37 UTC, Ali Çehreli wrote:
BaseClassesTuple and friends:

  https://dlang.org/phobos/std_traits.html

And the implementation of that is the `is` expression

https://dlang.org/spec/expression.html#IsExpression

specifically, with the `super` keyword.

static if (is(YourClass ListOfBaseTypes == super))
// use ListOfBaseTypes here; you can foreach, index, or slice it to get what you are looking for.

That's perfect. Thank you both so much!

Reply via email to