[Issue 8905] DList.Range: Internal error, inconsistent state

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 29 17:21:17 PDT 2012


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



--- Comment #2 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2012-10-29 17:21:16 PDT ---
(In reply to comment #1)
> 
> I think the code is invalid, that is not how "stable" is meant to be used. It
> just means that the insert will not modify the order of the *other* elements in
> the list.
> 
> The documentation states otherwise, but in this case, I think it is the
> documentation that is wrong.
> 
> When you first call "stableRemoveBack", the range becomes invalidated. That is
> what the assert is telling you.

And as you noted above, this violates the current semantics of
stableRemoveBack.

I am wondering if stableRemoveBack is intended for immutable data structures or
something. It certainly doesn't seem implementable for anything in
std.container.

> I don't think there is *ANY* way to ever make this work, and I'd suggest either
> of:
> *Re-writing the documentation.
> *Removing the function if the documentation is correct.
> 

I don't think so, either, and I agree with the recommendation.

-- 
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