[Issue 1178] New: templates - deduction + specialization won't compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 23 04:45:17 PDT 2007
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 at digitalmars.com
ReportedBy: leo.dahlmann at 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");
}
--
More information about the Digitalmars-d-bugs
mailing list