[Issue 10821] .byKey erroneously returns a null key

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 2 13:54:02 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10821



--- Comment #12 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-09-02 13:53:50 PDT ---
Btw, Slist has a stableLinearRemove, which Phobos documents as:

stableLinearRemove - same as linearRemove, but guarantees iterators are not
invalidated.

That sounds like this pseudocode is safe:

-----
auto range = slist[];

foreach (item; range)
{
    // do something

    slist.stableLinearRemove(item);

    // do something
}
-----

Slist are used in a signals implementation by Johannes Pfau. He uses this
stableLinearRemove in his disconnect method.

If this is not actually safe, then the docs should be more clear by what they
mean.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list