April 23, 2007 [Issue 1178] New: templates - deduction + specialization won't compile | ||||
---|---|---|---|---|
| ||||
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"); } -- |
April 27, 2007 [Issue 1178] templates - deduction + specialization won't compile | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 *** -- |
Copyright © 1999-2021 by the D Language Foundation