Bug 18933 – std.range.assumeSorted should not nest SortedRange!(SortedRange!(...), pred)
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-06-01T18:40:27Z
Last change time
2018-06-19T01:27:11Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2018-06-01T18:40:27Z
The motivation for fixing this was discovering that repeated application of `std.algorithm.sorting.sort` created new types unnecessarily which was causing a bunch of other templated code to be duplicated.
unittest
{
import std.algorithm.sorting : sort;
uint[] a;
// The next line currently fails.
assert(is(typeof(sort(a)) == typeof(sort(sort(a)))));
}
Comment #1 by n8sh.secondary — 2018-06-01T18:51:44Z