www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19689] New: large types cannot be moved

https://issues.dlang.org/show_bug.cgi?id=19689

          Issue ID: 19689
           Summary: large types cannot be moved
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: default_357-line yahoo.de

struct VeryLargeType
{
    static foreach (i; 500.iota)
    {
        mixin(format!"int v%s;"(i));
    }
}

unittest
{
    VeryLargeType a, b;
    move(a, b);
}

Result: std/traits.d(2848): Error: template instance
`std.traits.RepresentationTypeTuple!(VeryLargeType).Impl!(int, int, int)`
recursive expansion

Expected: not that.

--
Feb 20 2019