CT info about class' children

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Tue Apr 22 11:56:57 PDT 2014


On 2014-04-22 11:20, Yuriy wrote:
> Hello, is there a way of getting CT info of a class' children?

Not in a pretty way but I think this should work:

* Implement a custom RTInfo in object.d in druntime. This template will 
be instantiated with all user defined types

* For each type that is a class, check all it's parents via __traits
* If a parent is matching what you're looking for then you found a child

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list