[Issue 15057] New: std.string.indexOf and friends do not accept custom types with alias this to string
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Sep 14 02:23:07 PDT 2015
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: nobody at puremagic.com
Reporter: rburners at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list