Thanks, Ali.
On Friday, 3 March 2023 at 18:09:01 UTC, Ali Çehreli wrote:
Think may be due to D not having reference variables. Sometimes
one needs to use pointers.
Ah! I'm about five chapters away from Pointers ;-).
Actually, I had tried changing B.x1() to:
`ref X x1() { return &xs[0]; }`
but the compiler didn't accept it.
It's a bit weird that by taking the address of calling B.x1() and
thus getting an X*, I had to *dereference* that to pass it to the
helper function of A.mfd() which actually takes a `ref C`
argument.