> This is the closest thing:
>
> ---
> struct C {
> int x;
> int* ptr() @property { return &x; }
> }
>
> C foo;
> *foo.ptr = 10;
> assert(foo.x = 10);
> ---
Now you can also do:
struct C
{
int x;
}
int* ptr() @property { return &x; }
C foo;
*foo.ptr = 10;
assert(foo.x = 10);
if you can't or don't want to change C.