[Issue 17273] New: why is a const range not a range

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 24 11:12:59 PDT 2017


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

          Issue ID: 17273
           Summary: why is a const range not a range
           Product: D
           Version: D2
          Hardware: x86
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: sahmi.soulaimane at gmail.com

the following code works for me. the second assert should fail:

import std.range;

unittest
{
    static assert(isInputRange!(InputRange!int));
    static assert(!isInputRange!(const(InputRange!int)));
}

$ dmd --version
DMD32 D Compiler v2.073.0
Copyright (c) 1999-2016 by Digital Mars written by Walter Bright

--


More information about the Digitalmars-d-bugs mailing list