How to get to a class initializer through introspection?

Adam D. Ruppe destructionator at gmail.com
Mon Aug 3 14:47:55 UTC 2020


On Monday, 3 August 2020 at 14:44:38 UTC, Johan wrote:
> If `__traits(type, getInitializer)` would return a function, 
> then that's a different story...

Yes... and then it could skip =void items too. Like

struct A {
   int a = 10;
   ubyte[10000] b = void;
   int c = 20;
}

Could very well just be the two int assigns. Right now it will 
spit out 10000 zeros in the middle.


More information about the Digitalmars-d mailing list