Bug 15057 – std.string.indexOf and friends do not accept custom types with alias this to string
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-14T09:23:00Z
Last change time
2015-10-06T06:59:15Z
Assigned to
nobody
Creator
rburners
Comments
Comment #0 by rburners — 2015-09-14T09:23:07Z
With the rework of some of the functions in std.string, to range based versions, custom types like DirEntry, that have an alias this to a member returning a string, are not accepted anymore.
a = DirEntry("path");
auto idx = a.indexOf("a");
used to work
I'm working on a patch, to loosen the template constraint.
first part is https://github.com/D-Programming-Language/phobos/pull/3651
(In reply to Rainer Schuetze from comment #1)
> related issue with rangified function in std.file:
> https://issues.dlang.org/show_bug.cgi?id=15027
It's not just related, it's the same issue.
Comment #3 by code — 2015-10-06T06:59:15Z
*** This issue has been marked as a duplicate of issue 15027 ***