https://issues.dlang.org/show_bug.cgi?id=13990
Issue ID: 13990 Summary: std.algorithm.move incorrectly uses hasAliasing for class references Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: Phobos Assignee: schvei...@yahoo.com Reporter: schvei...@yahoo.com If we have an opaque class, we can't move the reference with std.algorithm.move: import std.algorithm.move class S; void main() { S s; S s2; std.algorithm.move(s, s2); // Error, size of S unknown. } However, all move has to do is assignment in this case. The issue is that we have a static if that checks hasAliasing on the class type to do a check for internal pointers, but that is only relevant for structs. It should be moved inside the check to see if it's a struct. Doing pull request now. --