[Issue 4953] Regression(2.031): templates don't do implicit conversion properly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 19 08:04:22 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=4953


hsteoh at quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh at quickfur.ath.cx


--- Comment #11 from hsteoh at quickfur.ath.cx 2012-03-19 08:04:35 PDT ---
Another data point:

void f(dstring d) { dstring e = d; }
f("abc");  // OK

void f()(dstring d) { dstring e = d; }
f("abc");  // OK

void f(byte[] b) { byte[] c = b; }
f([1,2,3]); // OK

void f()(byte[] b) { byte[] c = b; }
f([1,2,3]);
// Error: template test2.f() does not match any function template declaration
// Error: template test2.f() cannot deduce template function from argument
types !()(int[])

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list