www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18806] New: minIndex should be able to take an input range


          Issue ID: 18806
           Summary: minIndex should be able to take an input range but
                    does not
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: gamblemj gmail.com

maxIndex claims to work with an input range, but does not. Under the hood,
maxIndex just calls minIndex with the params to the comparison reversed.
However minIndex only accepts forward ranges and so errors if maxIndex (or
minIndex) is called with an input range. Looking at the code for minIndex I
cannot see why it couldn't accept an input range. This may be an easy fix,
unless I'm not grasping something.

Apr 27 2018