How to get to a class initializer through introspection?
uplink.coder at googlemail.com
Sun Aug 2 22:48:51 UTC 2020
On Sunday, 2 August 2020 at 22:25:19 UTC, Andrei Alexandrescu
> I'm working on redoing typeid for classes without compiler
> magic, and stumbled upon the class initializer - the bytes
> blitted over the class before the constructor is called.
> Any ideas on how to do that via introspection? The fields are
> accessible, but not their default values.
> It seems like __traits(type, getInitializer) might be necessary.
So you are introducing new compiler magic in the form of __traits,
To replace the old compiler magic in the form of type-info?
What exactly is the goal of this?
More information about the Digitalmars-d