https://issues.dlang.org/show_bug.cgi?id=15057

          Issue ID: 15057
           Summary: std.string.indexOf and friends do not accept custom
                    types with alias this to string
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: [email protected]
          Reporter: [email protected]

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

--

Reply via email to