digitalmars.D.bugs - [Issue 1178] New: templates - deduction + specialization won't compile
- d-bugmail puremagic.com (30/30) Apr 23 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1178
- d-bugmail puremagic.com (11/11) Apr 27 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1178
http://d.puremagic.com/issues/show_bug.cgi?id=1178 Summary: templates - deduction + specialization won't compile Product: D Version: 1.013 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: leo.dahlmann gmail.com The following code won't compile with these error messages: templates.d(11): template templates.test!(double).foo(T) does not match any temp late declaration templates.d(11): template templates.test!(double).foo(T) cannot deduce template function from argument types (double,char[2]) template test(R) { R foo(T)(float x, T param) { return cast(R)x; } } void main() { test!(double).foo(5.0, "hi"); } --
Apr 23 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1178 thomas-dloop kuehne.cn changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE ------- Comment #1 from thomas-dloop kuehne.cn 2007-04-27 12:35 ------- Workaround: use "5.0f" in istead of "5.0" *** This bug has been marked as a duplicate of 617 *** --
Apr 27 2007