Struct copies

bearophile bearophileHUGS at lycos.com
Mon Jan 27 17:39:46 PST 2014


Stanislav Blinov:

> Generally though, pure code generation issues aside, that is 
> one very strange swap function, bearophile :)

What's strange on this?


void swap(T)(ref T x, ref T y) pure nothrow {
     immutable aux = x;
     x = y;
     y = aux;
}

Bye,
bearophile


More information about the digitalmars-d-ldc mailing list