swap

fnvoid swap(T)(ref T lhs, ref T rhs) if (is(typeof(lhs.proxySwap(rhs))))

Swaps lhs and rhs. The instances lhs and rhs are moved in memory, without ever calling opAssign, nor any other function. T need not be assignable at all to be swapped.

If lhs and rhs reference the same instance, then nothing is done.

lhs and rhs must be mutable. If T is a struct or union, then its fields must also all be (recursively) mutable.

Parameters

lhsData to be swapped with rhs.
rhsData to be swapped with lhs.
fnvoid swap(T)(ref T lhs, ref T rhs) if (isBlitAssignable!T && !is(typeof(lhs.proxySwap(rhs)))) @trusted pure nothrow @nogc

ditto