move
fn
void move(T)(ref T source, ref T target)Moves source into target, via a destructive copy when necessary.
If T is a struct with a destructor or postblit defined, source is reset to its .init value after it is moved into target, otherwise it is left unchanged.
Preconditions: If source has internal pointers that point to itself and doesn't define opPostMove, it cannot be moved, and will trigger an assertion failure.
Parameters
source | Data to copy. |
target | Where to copy into. The destructor, if any, is invoked before the copy is performed. |
fn
T move(T)(return scope ref T source)Ditto