[Issue 16674] Clarify lifetime of pointer to AA entry

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Nov 10 05:47:24 PST 2016


https://issues.dlang.org/show_bug.cgi?id=16674

--- Comment #5 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Shachar Shemesh from comment #2)
> If there is any doubt re: where AA are going, I think we should take the
> opposite approach. It is easier to start with "no, this is UB", and the
> define it than to go the other direction.

This doesn't conflict with my recommendations. I think to move to a hash
algorithm where rehashing of any kind invalidates AA value pointers obtained
from the 'in' operator is going to result in massive breakage. We can't allow
that. That is what your points all ask about, except the first. The first can
either be "implementation defined" (I prefer this over UB) or valid.

--


More information about the Digitalmars-d-bugs mailing list