← Back to index
|
Original Bugzilla link
Bug 7775 – std.range.chunks on const array of strings too
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-03-25T13:02:00Z
Last change time
2015-01-27T02:57:09Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2012-03-25T13:02:09Z
import std.range: chunks; import std.array: join; void main() { const data = ["a1", "b2", "c3", "d4", "e5"]; foreach (c; chunks(data, 2)) string r = join(c); } 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)[])[])
Comment #1
by andy — 2015-01-27T02:57:09Z
compiled and ran fine on x64 linux and x64 windows using dmd 2.066.1 Assuming bug must have been fixed but cannot find commit.