mirror of
https://github.com/dlang/phobos.git
synced 2025-05-01 23:50:31 +03:00
Skip points to check when there are no pointers
This commit is contained in:
parent
f0f2c6f310
commit
ed914dfd10
1 changed files with 3 additions and 2 deletions
|
@ -1946,6 +1946,7 @@ if (isMutable!T && !is(typeof(T.init.proxySwap(T.init))))
|
||||||
{
|
{
|
||||||
// For structs with non-trivial assignment, move memory directly
|
// For structs with non-trivial assignment, move memory directly
|
||||||
// First check for undue aliasing
|
// First check for undue aliasing
|
||||||
|
static if (hasIndirections!T)
|
||||||
assert(!pointsTo(lhs, rhs) && !pointsTo(rhs, lhs)
|
assert(!pointsTo(lhs, rhs) && !pointsTo(rhs, lhs)
|
||||||
&& !pointsTo(lhs, lhs) && !pointsTo(rhs, rhs));
|
&& !pointsTo(lhs, lhs) && !pointsTo(rhs, rhs));
|
||||||
// Swap bits
|
// Swap bits
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue