[Issue 6849] std.algorithm.remove design

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 26 10:16:07 PDT 2011


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



--- Comment #2 from bearophile_hugs at eml.cc 2011-10-26 10:14:57 PDT ---
>From the same thread:

http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=30294

Steven Schveighoffer:

> Here is the resulting array and final state of a:
>
> import std.stdio, std.algorithm;
> void main() {
>      int[] a = [ 0, 1, 2, 3 ];
>      writeln( remove!(SwapStrategy.unstable)(a, 1));
>      writeln(a);
> }
> 
> output:
> 
> [3, 1, 2]
> [3, 1, 2, 3]
> 
> Clearly, index 0 was removed, not index 1.  Please file a bug.

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