On Thu, Mar 16, 2017 at 07:17:41PM +0000, Adam D. Ruppe via Digitalmars-d-learn wrote: > On Thursday, 16 March 2017 at 19:00:08 UTC, H. S. Teoh wrote: > > Actually, https://issues.dlang.org/show_bug.cgi?id=12625 shows that > > implicit slicing is still a problem: > > Oh yikes, I figured it would still be copied onto the local stack even > though it is an rvalue. [...]
Well, yes, it would be copied to the local stack once func() returns, but the problem is, for how long. It may be that the current implementation in dmd keeps that stack location allocated until the function returns, but it would be equally valid to reuse that stack location after the expression is over, because by definition, rvalues in the expression would have gone out of scope. T -- Computers are like a jungle: they have monitor lizards, rams, mice, c-moss, binary trees... and bugs.
