[Issue 10879] New: std.variant Variant/Algebraic: Can't store static arrays > 32(/16) bytes

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 24 06:13:57 PDT 2013


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

           Summary: std.variant Variant/Algebraic: Can't store static
                    arrays > 32(/16) bytes
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: johannespfau at gmail.com


--- Comment #0 from Johannes Pfau <johannespfau at gmail.com> 2013-08-24 06:13:56 PDT ---
Test case:
---------
import std.variant;

void main()
{
    Variant v;
    v = cast(int[10]) [1,2,3,4,5,6,7,8,9,10];
}
---------
http://dpaste.dzfl.pl/b3f532c0

std/variant.d(551): Error: new can only create structs, dynamic arrays or class
objects, not int[10LU]'s

There's an unit test in std.variant which tests static arrays of 5 elements.
This test fails on ARM as variant can only store 16 bytes (creal.sizeof) on
ARM, not 20.

-- 
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