[Issue 9894] New: Member func of templated struct can't pass varargs to templated member func

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Apr 6 19:34:18 PDT 2013


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

           Summary: Member func of templated struct can't pass varargs to
                    templated member func
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: cbkbbejeap at mailinator.com


--- Comment #0 from Nick Sabalausky <cbkbbejeap at mailinator.com> 2013-04-06 19:34:17 PDT ---
struct Foo(TArgs...) {
     void func(TArgs args) { func2(args); }
     void func2()(TArgs args) {}
}

void main() {
     Foo!(int).func(5);
}

DMD output:
test.d(2): Error: template test.Foo!(int).Foo.func2 does not match any function
template declaration. Candidates are:
test.d(3):        test.Foo!(int).Foo.func2()(TArgs args)
test.d(2): Error: template test.Foo!(int).Foo.func2()(TArgs args) cannot deduce
template function from argument types !()(int)
test.d(7): Error: template instance test.Foo!(int) error instantiating

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