[Issue 18806] New: minIndex should be able to take an input range but does not
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 28 03:26:35 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18806
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 at puremagic.com
Reporter: gamblemj at 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.
--
More information about the Digitalmars-d-bugs
mailing list