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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Robert Schadek <[email protected]> 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: -------