Phobos is now compiled with -preview=dip1000

Mike Franklin slavo5150 at yahoo.com
Fri May 17 21:11:27 UTC 2019


On Friday, 17 May 2019 at 20:59:43 UTC, Mike Franklin wrote:

> I don't think it does because `Queue!(T).store` has infinite 
> lifetime beyond that of even `main`, at least as far as the 
> compiler is concerned.  The compiler doesn't have enough 
> information to know that `store` is tied to the lifetime of 
> `Queue!(T)` (a.k.a `rawData`) and maybe that's a missing 
> language feature.  Maybe we should be allowed to declare 
> aggregate fields as `scope` to convey that, but the compiler 
> currently disallows it.

Or we build in some way for slices to know their lifetime 
relative to the source array from which they were created.  But 
I'm not sure how that would work.

Mike




More information about the Digitalmars-d-announce mailing list