← Back to index
|
Original Bugzilla link
Bug 7776 – std.array.join on const array of strings too
Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-03-25T13:03:00Z
Last change time
2013-05-21T17:03:38Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2012-03-25T13:03:00Z
import std.array: join; void main() { string[] data1 = ["foo", "bar"]; auto r1 = join(data1, "_"); // OK const string[] data2 = ["foo", "bar"]; auto r2 = join(data2, "_"); // error } DMD 2.059head gives: test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) && isInputRange!(ElementType!(RoR)) && isForwardRange!(R) && is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R)))) does not match any function template declaration test.d(6): Error: template std.array.join(RoR,R) if (isInputRange!(RoR) && isInputRange!(ElementType!(RoR)) && isForwardRange!(R) && is(Unqual!(ElementType!(ElementType!(RoR))) == Unqual!(ElementType!(R)))) cannot deduce template function from argument types !()(const(immutable(char)[][]),string)
Comment #1
by bearophile_hugs — 2013-05-21T17:03:38Z
*** This issue has been marked as a duplicate of issue 7690 ***