@live questions

Timon Gehr timon.gehr at gmx.ch
Mon Nov 23 03:39:21 UTC 2020


On 23.11.20 01:21, thedeemon wrote:
> 
> @live void foo()
> {
>      auto a = new S("aaa");
>      auto b = new S("bb");
> 
>      auto c = longer(a,b); // I need a reference to one of them
>      show(c);
> 
>      release(a);
>      release(b);
> }
> 
> This doesn't compile and I wonder how to fix this.

scope c = longer(a,b);


More information about the Digitalmars-d mailing list