On Sunday, 17 June 2018 at 02:29:12 UTC, Adam D. Ruppe wrote:
On Saturday, 16 June 2018 at 08:32:38 UTC, DigitalDesigns wrote:
I need to get the protected and private members for
serialization.
This breaks encapsulation.
A better design would be to have a class know how to serialize
itself
On Saturday, 16 June 2018 at 08:32:38 UTC, DigitalDesigns wrote:
I need to get the protected and private members for
serialization.
This breaks encapsulation.
A better design would be to have a class know how to serialize
itself via a serializable interface.
On Saturday, June 16, 2018 13:12:13 bauss via Digitalmars-d-learn wrote:
> On Saturday, 16 June 2018 at 08:32:38 UTC, DigitalDesigns wrote:
> > mixin(`foo!(typeof(T.`~m~`));
> >
> > gives me an error about m being protected.
> >
> > Error: class `X` member `name` is not accessible.
> >
> > this
On Saturday, 16 June 2018 at 08:32:38 UTC, DigitalDesigns wrote:
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
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