[Issue 6764] New: IFTI fails on typesafe variadic function over static array with non IntegerLiteral length

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 3 23:15:01 PDT 2011


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

           Summary: IFTI fails on typesafe variadic function over static
                    array with non IntegerLiteral length
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis <verylonglogin.reg at gmail.com> 2011-10-03 23:14:20 PDT ---
---
enum N = 1; //use const for D1

alias size_t[N] T; //workaround
void f()(T arr...) { }

void g()(size_t[1] arr...) { }

void h()(size_t[N] arr...) { }

void main()
{
    f(0);    //good
    g(0);    //good
    h!()(0); //good
    h(0);    //Error: template main.f() does not match any function template
declaration
}
---

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