[Issue 10930] std.array.replace cannot simple replace an element in array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 31 02:47:54 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=10930

--- Comment #4 from RazvanN <razvan.nitu1305 at gmail.com> ---
This should do the trick:

        auto arr = [ 1, 1, 1 ];
        replaceInPlace(arr, 1, 2, [2]);

        writeln(arr);

I suggest we close this.

Sorry for the above comment. It was a copy-paste mistake.

--


More information about the Digitalmars-d-bugs mailing list