[Issue 8067] New: std.algorithm.move doesn't work for static array of elaborate struct

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 8 10:19:17 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8067

           Summary: std.algorithm.move doesn't work for static array of
                    elaborate struct
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-05-08 10:20:38 PDT ---
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
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list