Re: Property access to a struct that contains struct

2017-02-26 Thread Guenter via Digitalmars-d
On Sunday, 26 February 2017 at 11:18:12 UTC, Mike Parker wrote: On Sunday, 26 February 2017 at 11:05:42 UTC, Guenter wrote: Hi, i do not understand where I am wrong in this code. I seems there is a missing constructor, but i have no idea where. @property A_t ext() { return fext; }

Re: Property access to a struct that contains struct

2017-02-26 Thread Guenter via Digitalmars-d
On Sunday, 26 February 2017 at 11:15:21 UTC, Eugene Wissner wrote: you return a copy of A_t and then change this copy instead of the real B_t member. Thank you. Guenter

Property access to a struct that contains struct

2017-02-26 Thread Guenter via Digitalmars-d
Hi, i do not understand where I am wrong in this code. I seems there is a missing constructor, but i have no idea where. module main; import std.stdio; struct A_t { int fvalue; A_t opCall() { return this; }; @property int value () { return fvalue; } @property void