move

fnvoid move(T)(ref T source, ref T target) if (__traits(compiles, target = T.init))

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

sourceData to copy.
targetWhere to copy into. The destructor, if any, is invoked before the copy is performed.
fnT move(T)(return scope ref T source)

Ditto