digitalmars.D.bugs - [Issue 9894] New: Member func of templated struct can't pass varargs to templated member func
- d-bugmail puremagic.com (32/32) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9894
- d-bugmail puremagic.com (6/6) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9894
- d-bugmail puremagic.com (18/18) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9894
- d-bugmail puremagic.com (11/11) Apr 07 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9894
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 puremagic.com ReportedBy: cbkbbejeap mailinator.com 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: -------
Apr 06 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9894 19:36:59 PDT --- Note that if func2 is *NOT* a template, then it works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9894 19:45:48 PDT --- Workaround: struct Foo(TArgs...) { void func(TArgs args) { this.workaround(args); } void func2()(TArgs args) {} } void workaround(Struct, TArgs...)(Struct s, TArgs args) { s.func2!()(args); } void main() { Foo!(int) f; f.func(5); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9894 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 9885 *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 07 2013