www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18577] New: Loose isForwardRange

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

          Issue ID: 18577
           Summary: Loose isForwardRange
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: yshuiv7 gmail.com

Loose isForwardRange to something like:

isInputRange!R && is(Unqual!(ReturnType!((R r) => r.save)) == Unqual!R)

I'm writing functions that takes a range and produce another range, with the
guarantee that the origin range is not changed. So I need save() to produce a
non-const range from a const one, which does not meet the current
isForwardRange criteria.

--
Mar 07 2018