[Issue 9071] New: sort function won't compile but Range fits describtion
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Nov 24 06:32:04 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9071
Summary: sort function won't compile but Range fits describtion
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: rburners at gmail.com
--- Comment #0 from Robert Schadek <rburners at gmail.com> 2012-11-24 06:32:03 PST ---
The function sortImpl implies that the type returned by the slice operator of
the passed range is of the same type. This must not be true. If it is not
sortImpl will not instantiate recursively because of a type mismatch. This is a
problem for custom container. (Currently I have this problem)
To fix this. It should be checked whether or not the returned type of the
opSlice funtion is of the same type as the original range.
static assert(is(ReturnType!(Range.opSlice) == Range));
--
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