Bug 9654 – Template function cannot take string by ref T[len]
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-05T20:46:00Z
Last change time
2013-03-15T09:58:40Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2013-03-05T20:46:45Z
This code should work.
void foo(ref const char[8] str) {}
void bar(T)(ref const T[8] str) {}
void main()
{
foo("testinfo"); // OK
bar("testinfo"); // should be OK, but fails
}