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


  • Phobos is now compiled with -p... Walter Bright via Digitalmars-d-announce
    • Re: Phobos is now compile... Dukc via Digitalmars-d-announce
      • Re: Phobos is now com... Walter Bright via Digitalmars-d-announce
        • Re: Phobos is now... Dukc via Digitalmars-d-announce
          • Re: Phobos is... Walter Bright via Digitalmars-d-announce
            • Re: Phob... Meta via Digitalmars-d-announce
              • Re: ... Mike Franklin via Digitalmars-d-announce
                • ... Mike Franklin via Digitalmars-d-announce
                • ... Meta via Digitalmars-d-announce
                • ... Mike Franklin via Digitalmars-d-announce
                • ... Mike Franklin via Digitalmars-d-announce
                • ... Meta via Digitalmars-d-announce
                • ... Meta via Digitalmars-d-announce
                • ... Jonathan M Davis via Digitalmars-d-announce
              • Re: ... ag0aep6g via Digitalmars-d-announce
                • ... Meta via Digitalmars-d-announce
                • ... ag0aep6g via Digitalmars-d-announce
                • ... Meta via Digitalmars-d-announce
                • ... ag0aep6g via Digitalmars-d-announce
                • ... Jonathan M Davis via Digitalmars-d-announce
                • ... Walter Bright via Digitalmars-d-announce

Reply via email to