[Issue 6934] New: [CTFE] std.range.transversal at compile-time too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 11 19:41:59 PST 2011


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

           Summary: [CTFE] std.range.transversal at compile-time too
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-11-11 19:41:18 PST ---
It seems transversal() can't run at compile-time:


import std.range: transversal;
int foo() {
    auto M = [[1,2], [3,4]];
    foreach (x; transversal(M, 0)) {}
    return 0;
}
enum _ = foo();
void main() {}



DMD 2.057head gives:

...\dmd2\src\phobos\std\array.d(328): Error: Cannot determine length of
Transversal([[1,2],[3,4]],0u)._input at compile time

...\dmd2\src\phobos\std\range.d(4648):        called from here:
popFront(this._input)
test.d(4):        called from here: __r1.popFront()
test.d(7):        called from here: foo()

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