http://d.puremagic.com/issues/show_bug.cgi?id=3801
Summary: CTFE: this.arr[i] cannot be evaluated at compile time for structs Product: D Version: 2.040 Platform: Other OS/Version: Windows Status: NEW Severity: blocker Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: lud...@informatik.uni-luebeck.de --- Comment #0 from S�nke Ludwig <lud...@informatik.uni-luebeck.de> 2010-02-14 07:45:33 PST --- A static array contained inside a struct is not accessible during CTFE. Because of this, it seems impossible (since some versions) to define compile-time constants of such structures (for example tuple vectors or matrices). --- struct S { int arr[1]; this(int x){ arr[0] = x; // (this.arr[0u]) = x cannot be evaluated at compile time } } immutable S s_constant = S(1); // Error: cannot evaluate __ctmp1.this(1) at compile time --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------