Skip points to check when there are no pointers

This commit is contained in:
monarchdodra 2013-09-27 14:00:51 +02:00
parent f0f2c6f310
commit ed914dfd10

View file

@ -1946,6 +1946,7 @@ if (isMutable!T && !is(typeof(T.init.proxySwap(T.init))))
{
// For structs with non-trivial assignment, move memory directly
// First check for undue aliasing
static if (hasIndirections!T)
assert(!pointsTo(lhs, rhs) && !pointsTo(rhs, lhs)
&& !pointsTo(lhs, lhs) && !pointsTo(rhs, rhs));
// Swap bits