How to access private variable of outer class from an inner struct
Hipreme
msnmancini at hotmail.com
Sun Jan 15 12:54:52 UTC 2023
On Sunday, 15 January 2023 at 12:44:51 UTC, thebluepandabear
wrote:
>
> Thanks.
>
> How will the variable `outer` become the reference to the
> current `X` object (if that makes sense?). Does the compiler do
> it automatically?
You'll have to create your struct like `return Y(this)`. It
basically depends on how you're using the struct
More information about the Digitalmars-d-learn
mailing list