Exchanges the values of a and b.
$(D_PSYMBOL swap) moves the contents of a and b without calling its postblits or destructors.
The first object.
The second object.
int a = 3, b = 5; swap(a, b); assert(a == 5); assert(b == 3);
See Implementation
Exchanges the values of a and b.
$(D_PSYMBOL swap) moves the contents of a and b without calling its postblits or destructors.