The lifetime of reduce's internal seed

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Apr 22 11:49:40 PDT 2014


On Tue, 22 Apr 2014 14:47:19 -0400, monarch_dodra <monarchdodra at gmail.com>  
wrote:

> In this case no, but;
> //----
> int[1] foo();
> int[] a = foo();
> //----
> *is* slicing an rvalue, and it *does* compile. I don't think there needs  
> to be escape analysis to catch this.

Oh yeah, that's bad.

-Steve


More information about the Digitalmars-d-learn mailing list