Bug 12224 – std.algorithm.move does not work for arrays of static length
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-22T05:47:00Z
Last change time
2014-02-22T08:02:54Z
Assigned to
nobody
Creator
simon.buerger
Comments
Comment #0 by simon.buerger — 2014-02-22T05:47:08Z
std.algorithm.move does not avoid postblit/destructor for arrays of static length (which are value-types). Both variants of move (one and two parameters) have this issue.
struct S
{
this(this) { writefln("copy"); }
}
void main()
{
S[1] a, b;
b = move(a); // calls copy-constructor but should not
move(a, b); // ditto
}
Comment #1 by simon.buerger — 2014-02-22T08:02:54Z
*** This issue has been marked as a duplicate of issue 8067 ***