Have a template function register(T)() instantiated and executed at startup for all sub classes of a specific base class?

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Sun Sep 21 10:41:07 UTC 2025


Yeah this is on my TODO list. I first encountered these issues over 10 
years ago, but couldn't begin considering how to solve them back then.

I'm waiting to see where Steven's work ends up for the GC.
That'll cover both TypeInfo and Monitor problems, that are more 
GC/runtime related than me.

Custom root classes, different kind of TypeInfo (subset), registration 
of types, reinterpretting parent methods as child instances (so have 
access to the actual type of this). Are all things on my list I want to 
explore.


More information about the Digitalmars-d mailing list