← Back to index
|
Original Bugzilla link
Bug 11052 – allow pathSplitter and to!() template fails
Status
RESOLVED
Resolution
WORKSFORME
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-16T07:33:00Z
Last change time
2020-03-21T03:56:32Z
Keywords
pull
Assigned to
No Owner
Creator
Andrej Mitrovic
Comments
Comment #0
by andrej.mitrovich — 2013-09-16T07:33:00Z
----- import std.array; import std.conv; import std.path; void main() { // ng: toImpl template instance failure string[] x = to!(string[])(pathSplitter("/foo/bar")); // ng: can't convert const(char[])[] => string[] string[] y = pathSplitter("/foo/bar").array; // ng: toImpl template instance failure const(char[])[] z = to!(const(char[])[])(pathSplitter("/foo/bar")); } ----- I'm not sure why .array returns const(char[])[] instead of const(char)[][]. Either way, to!() still won't work.
Comment #1
by b2.temp — 2018-08-25T16:05:04Z
pull :
https://github.com/dlang/phobos/pull/6679
Comment #2
by b2.temp — 2018-08-25T20:48:49Z
The second error is already fixed. The first and the last are not bugs but enhancements since `to` is not supposed to convert ranges to array at all.
Comment #3
by b2.temp — 2018-08-25T20:53:27Z
`to` was tried as a workaround i think so the problem is gone.