[Issue 18933] New: std.range.assumeSorted should not nest SortedRange!(SortedRange!(...), pred)
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Jun  1 18:40:27 UTC 2018
    
    
  
https://issues.dlang.org/show_bug.cgi?id=18933
          Issue ID: 18933
           Summary: std.range.assumeSorted should not nest
                    SortedRange!(SortedRange!(...), pred)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: n8sh.secondary at hotmail.com
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)))));
}
--
    
    
More information about the Digitalmars-d-bugs
mailing list