Derived classes? Reflection

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat Apr 13 10:13:25 PDT 2013


On 4/13/13, Tofu Ninja <emmons0 at purdue.edu> wrote:
> Currently is there a way to get all of the subclasses of a class
> at compile time?

There might be things like using .moduleinfo and traversing imports to
find all classes, but I think separate compilation makes this
unreliable.

There is however BaseClassTuple in std.traits, so you can pass a leaf
class to get the class hierarchy.


More information about the Digitalmars-d-learn mailing list