www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16170] New: std.algorithm.sorting.partition has many issues

https://issues.dlang.org/show_bug.cgi?id=16170

          Issue ID: 16170
           Summary: std.algorithm.sorting.partition has many issues
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: jack jackstouffer.com

* The SwapStrategy.semistable branch does not call save for result, therefore
this breaks with forward ranges
* The SwapStrategy.unstable !isDynamicArray branch does not call save for
result, therefore this breaks with forward ranges
* The SwapStrategy.unstable !isDynamicArray branch requires a bidirectional
range, only forward range primitives are tested for
* is(typeof(swap(result.front, r.front))) is never tested for

A lot of this stems from the fact that arrays are the only means of testing for
this function

--
Jun 13 2016