On Thursday, 14 July 2016 at 06:23:15 UTC, Gorge Jingale wrote:
I think that the assignment in the first case is not assigning the reference returned by auto ref GetValue().


`ref` in D is shallow, it only applies to the thing it is specifically on and is lost across assignments. Once you assign a ref to a new variable, it isn't ref anymore.

I am expecting it to work like a pointer,

If you need a pointer, use a pointer! ref is a different thing.

Reply via email to