Thread overview
[Issue 12029] Swap on std.container.Array?
Jun 06, 2014
Justin Whear
Nov 21, 2015
bb.temp@gmx.com
Mar 21, 2020
Basile-z
June 06, 2014
https://issues.dlang.org/show_bug.cgi?id=12029

Justin Whear <justin@economicmodeling.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |justin@economicmodeling.com

--- Comment #2 from Justin Whear <justin@economicmodeling.com> ---
This still fails in git head.

--
November 21, 2015
https://issues.dlang.org/show_bug.cgi?id=12029

bb.temp@gmx.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bb.temp@gmx.com
         Resolution|---                         |FIXED

--- Comment #3 from bb.temp@gmx.com ---
swap() now works on Array:

_______________
void main() {
    import std.algorithm;
    import std.container: Array;
    auto arr = Array!int([1, 2]);
    swap(arr[0], arr[1]);
    assert(arr[0] == 2 && arr[1] == 1);
}
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=12029

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--