Getting derived classes

BCS ao at pathlink.com
Fri Oct 17 14:20:35 PDT 2008


Reply to dsimcha,

> I know that, in std.traits, there's a template that spits out all base
> classes for a given class.  Based on reading the source, it seems to
> work based on a rather interesting use case for is expressions.  Is
> there any equivalent way to do the opposite:  For any given position
> in a class hierarchy, to get a tuple of all possible descendants?
> 

Via DLL/SO's, a derived class can be /written/ after the program that it 
will be used in is /compiled/. Because of that (and other less restrictive 
forms of that issue) The most general answer is; can't be done.





More information about the Digitalmars-d mailing list