This code doesn't work. import std.algorithm, std.traits; void main() { static int postblit, dtor; static struct S2 { this(this){ ++postblit; } ~this(){ ++dtor; } } S2[3] sa21; postblit = dtor = 0; S2[3] sa22 = move(sa21); assert(postblit == 0); // fails }
Fixed with all other `move` issues in [provoking] https://github.com/D-Programming-Language/phobos/pull/923
*** Issue 12224 has been marked as a duplicate of this issue. ***
This code successfully compiles and runs. closing as fixed.