On 08/12/2014 15:53, Steven Schveighoffer wrote:
scope ref int foo(ref int x);will do it.So: int x; foo(x) += 1; will compile?
Yes, because foo's argument is not scope, it can be returned.
Nick Treleaven via Digitalmars-d Tue, 09 Dec 2014 06:26:15 -0800
On 08/12/2014 15:53, Steven Schveighoffer wrote:
scope ref int foo(ref int x);will do it.So: int x; foo(x) += 1; will compile?
Yes, because foo's argument is not scope, it can be returned.