[Issue 7769] New: relax inout rule doesn't work for template function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 24 23:29:21 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7769
Summary: relax inout rule doesn't work for template function
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-03-24 23:29:44 PDT ---
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)
--
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