module iftibug;
struct Wrap(T) {
alias T ElemType;
}
void func(I)(Wrap!(I).ElemType a) {
}
void main()
{
func!(float)(2.0f) // ok
func(2.0f); // error:
//iftibug.d(33): template iftibug.func(I) does not match any template declaration
//iftibug.d(33): template iftibug.func(I) cannot deduce template function from argument types (float)
}
------
Ignore the fact that Wrap!(I).ElemType is just 'I' in this little snippet -- this test case was extracted from some C++ code I'm trying to port where the situation was not quite so simple.
Comment #1 by bugzilla — 2008-02-21T01:03:46Z
*** This bug has been marked as a duplicate of 1454 ***