[Issue 4888] New: Heavy reliance on Bug 3534 in Phobos range usage
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Sep 18 11:59:20 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4888
Summary: Heavy reliance on Bug 3534 in Phobos range usage
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: major
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: dsimcha at yahoo.com
Depends on: 3535
--- Comment #0 from David Simcha <dsimcha at yahoo.com> 2010-09-18 11:58:44 PDT ---
Sort of a meta-bug. Large portions of Phobos are relying on Bug 3534 to allow
const/immutable arrays to be used as ranges, because this bug allows calling
popFront() and popBack() on them. Example from std.string:
sizediff_t
indexOf(Char1, Char2)(in Char1[] s, in Char2[] sub,
CaseSensitive cs = CaseSensitive.yes)
{
// Somewhere in the function body:
immutable result = s.length - std.algorithm.find(s, sub).length;
}
This code doesn't work if std.array.popFront() is modified to not be callable
on const/immutable arrays.
This is just one example. There are several more across much of Phobos.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list