Bug 13128 – std.container.array.Array.stableLinearRemove is erroneously an alias to std.algorithm.remove (and linearRemove is not stable)

Status
NEW
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-14T04:40:38Z
Last change time
2024-12-01T16:21:57Z
Assigned to
No Owner
Creator
Jakob Ovrum
Moved to GitHub: phobos#10075 →

Comments

Comment #0 by jakobovrum — 2014-07-14T04:40:38Z
Array provides linear removal, but the `stableLinearRemove` alias for the non-boolean specialization points to std.algorithm.remove, not its own `linearRemove` member as it should. However, it turns out that while Array tries to make removal stable, a bug prevents it from actually being stable at the moment: --- import std.container : Array; import std.stdio : writeln; void main() { auto arr = Array!int(1, 2); auto r = arr[]; arr.linearRemove(arr[0 .. 1]); writeln(r); // Range violation } ---
Comment #1 by robert.schadek — 2024-12-01T16:21:57Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/10075 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB