typeof on protected field

DigitalDesigns DigitalDesigns at gmail.com
Sat Jun 16 08:32:38 UTC 2018


mixin(`foo!(typeof(T.`~m~`));

gives me an error about m being protected.

Error: class `X` member `name` is not accessible.

this also happens when using __traits(getMember, T, m); X is in 
another module. Works fine when X is in the same module.

I need to get the protected and private members for serialization.


More information about the Digitalmars-d-learn mailing list