Immutable objects and constructor ?
chmike via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri May 20 09:27:17 PDT 2016
On Friday, 20 May 2016 at 15:43:28 UTC, Marc Schütz wrote:
>
> It looks like your don't actually need `Obj` to be a real
> nested class. Try declaring it as `static Obj : Info { }`. This
> should work if `Obj`'s methods don't need access to `MyInfo`'s
> non-static members.
That worked great. Thank you.
The only problem left is how I can get mutable references to
immutable objects.
More information about the Digitalmars-d-learn
mailing list