[Issue 2599] New: Two variadic parameters should be accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 21 08:15:56 PST 2009


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

           Summary: Two variadic parameters should be accepted
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: andrei at metalanguage.com


The following code is not accepted:

void f(T1..., T2...)(T2 args)
{
    ...
}

However, it is unambiguous that T1 are supposed to be passed explicitly,
whereas T2 bind to the arguments. Currently there is a workaround:

template f(T1...)
{
    alias fImpl!(T1).f f;
}

template fImpl(T1...)
{
    void f(T2...)(T2 args) { ... }
}

The workaround complicates code needlessly and introduces extraneous symbols.


-- 



More information about the Digitalmars-d-bugs mailing list