Function Vector.proxySwap
Swaps the contents of this
and rhs
.
void proxySwap
(
scope ref typeof(this) rhs
) scope;
Examples
auto a = Vector!(int, 6) .build(1, 2, 3);
auto b = Vector!(int, 6) .build(4, 5, 6);
a .proxySwap(b);
assert(a == [4, 5, 6]);
assert(b == [1, 2, 3]);
import std .algorithm .mutation : swap;
swap(a, b);
assert(a == [1, 2, 3]);
assert(b == [4, 5, 6]);