Bug 9362 – Add a method to remove one item to std.container.SList

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-20T15:02:18Z
Last change time
2017-12-18T22:55:27Z
Assigned to
Alexandru Razvan Caciulescu
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-01-20T15:02:18Z
I suggest to to std.container.SList a handy function to remove a single item from the list. Most times I don't want to remove more than one item (so far in my D code I don't remember ever having to remove more than one item at once from a SList). In D.learn newsgroup I have seen many persons troubled by SList.linearRemove. If SList gets such helper method to remove one item, then probably std.container.DList should have a similar method.
Comment #1 by alexandru.razvan.c — 2017-10-17T14:53:24Z
Comment #2 by github-bugzilla — 2017-10-24T13:33:42Z
Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/aee56671f8226cb910017d0f5c49186771d06d1d Fix issue 9362 - Add linearRemoveElement from Slist https://github.com/dlang/phobos/commit/e5a146bca3b462b32c1613e1a1f6d6777942e3a1 Merge pull request #5784 from Darredevil/issue-9362-slist-remove Fix Issue 9362 - Add a method to remove one item to std.container.SList
Comment #3 by github-bugzilla — 2017-12-18T22:55:27Z
Commits pushed to stable at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/aee56671f8226cb910017d0f5c49186771d06d1d Fix issue 9362 - Add linearRemoveElement from Slist https://github.com/dlang/phobos/commit/e5a146bca3b462b32c1613e1a1f6d6777942e3a1 Merge pull request #5784 from Darredevil/issue-9362-slist-remove