Bug 7769 – relax inout rule doesn't work for template function
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-24T23:29:00Z
Last change time
2012-03-25T20:35:42Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2012-03-24T23:29:44Z
In 2.059head, inout rule was relaxed properly.
Therefore, following code should work.
void f(K)(inout(K) value){}
void main()
{
f("abc");
}
But it raisees errors:
Error: template test.f(K) does not match any function template declaration
Error: template test.f(K) cannot deduce template function from argument types !()(string)