Bug 4994 – std.range assumeSorted and SortedRange!() don't work with immutables
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-10-04T15:52:00Z
Last change time
2011-01-22T14:21:59Z
Assigned to
andrei
Creator
ah08010-d
Comments
Comment #0 by ah08010-d — 2010-10-04T15:52:36Z
The assumeSorted and SortedRange templates cannot work with immutable data.
Apparently, one requirement for being sorted is supporting .save. The SortedRange!().save as written uses typeof() to copy the type of the input, without stripping off immutability.