www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8267] New: called template only instantiated once with foreach over expression type tuple

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 puremagic.com
        ReportedBy: travis gockelhut.com



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: -------
Jun 19 2012