[Issue 8267] New: called template only instantiated once with foreach over expression type tuple

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 19 09:08:55 PDT 2012


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

           Summary: called template only instantiated once with foreach
                    over expression type tuple
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: travis at gockelhut.com


--- Comment #0 from Travis Gockel <travis at gockelhut.com> 2012-06-19 09:11:14 PDT ---
Take the following code:

    template Seq(T...) { alias T Seq; }

    auto exec(alias F)() { return F(); }

    void main()
    {
        foreach (x; Seq!(0, 1))
            static assert (exec!(() => x)() == x);
    }

This will fail with "Error: static assert  (0 == 1) is false" on DMD64 v2.059.

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