D-Programming-Language/phobos — pull request #910 by monarchdodra (2012-10-30 11:47:46+00:00)
Title: Fixes & docs for DList

Addresses all issues in:
http://forum.dlang.org/thread/gjhclwsuqyhrimdeoaec@forum.dlang.org
and
http://d.puremagic.com/issues/show_bug.cgi?id=8905

1. Adds extra documentation on what to expect from range operations.
2. Fixes a lot of corner cases, when trying to push after poping, inparticular, the two bugs in 8905.
3. Renamed `opOpassign` into `opOpAssign`
4. Fixed the "~" operators, which were not behaving according to docuementation (and tested them in unit tests)
5. Major re-implemention of `remove` and `insertBeforeNode`, which were more or less responsible for all the bugs in DList.

Also, tons of unittests.

Finally: And this is kind of major, I scheduled for deprecation "stableRemove(R)" and "stableLinearRemove(R)", since neither could actually guarantee stability. For example:
```D
auto a = DList([1, 2, 3]);
auto r1 = a[];
auto r2 = a[];
r1.popBack(); //[1, 2]
r2.popFront(); //[2, 3]
a.stableRemove(r1);/// DERP!
//r2 is now invalid.
```