https://issues.dlang.org/show_bug.cgi?id=16996
Issue ID: 16996
Summary: std.algorithm.remove with SwapStrategy.unstable
removes more entries
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
I assume the following is a bug:
auto a = [ 0, 1, 2, 3, 4, 5 ];
assert(remove!(SwapStrategy.stable)(a, tuple(1, 4)) == [0, 4, 5]);
a = [ 0, 1, 2, 3, 4, 5 ];
assert(remove!(SwapStrategy.unstable)(a, tuple(1, 4)) == [0]);
or at least this behavior should be properly documented.
--