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");
}
Comment #1 by thomas-dloop — 2007-04-27T12:35:53Z
Workaround:
use "5.0f" in istead of "5.0"
*** This bug has been marked as a duplicate of 617 ***