www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13507] New: std.range.enumerate with BigInt indexes too

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

          Issue ID: 13507
           Summary: std.range.enumerate with BigInt indexes too
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: bearophile_hugs eml.cc

void main() {
    import std.range: enumerate;
    import std.bigint: BigInt;
    auto r1 = [10, 20].enumerate!BigInt;
    auto r2 = [10, 20].enumerate!(BigInt(0));
}



dmd 2.067alpha gives:

test.d(4,23): Error: template std.range.enumerate cannot deduce function from
argument types !(BigInt)(int[]), candidates are:
...\dmd2\src\phobos\std\range.d(7901,6):        std.range.enumerate(Enumerator
= size_t, Range)(Range range, Enumerator start = 0) if (isIntegral!Enumerator
&& isInputRange!Range)
test.d(5,23): Error: template std.range.enumerate cannot deduce function from
argument types !(BigInt(BigUint([0u]), false))(int[]), candidates are:
...\dmd2\src\phobos\std\range.d(7901,6):        std.range.enumerate(Enumerator
= size_t, Range)(Range range, Enumerator start = 0) if (isIntegral!Enumerator
&& isInputRange!Range)

--
Sep 20 2014