static assert(!shouldMove!(char)); static assert(!shouldMove!(int)); static assert(!shouldMove!(string)); static assert(!shouldMove!(int[])); class C {} static assert(!shouldMove!(C)); struct POD {} static assert(!shouldMove!(POD)); static assert(shouldMove!(Uncopyable)); struct WithDtor { ~this() nothrow {} } static assert(shouldMove!(WithDtor));
std.traits.hasElaborateMove.
True if the last reference of a T in the scope of its lifetime should be passed by move instead of by copy either because
- it cannot be copied or - because it has an elaborate constructor or elaborate destructor that can be elided via a move.
This excludes arrays and classes.
Note that __traits(isPOD, T) implies `core.internal.traits.hasElaborateAssign!T || core.internal.traits.hasElaborateDestructor!T`.