www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24382] New: std.range.only should have assignable elements

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

          Issue ID: 24382
           Summary: std.range.only should have assignable elements
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: snarwin+bugzilla gmail.com

Currently, the range returned by std.range.only does not have assignable
elements, which means that it cannot be used with certain algorithms (e.g.,
transposed).

Since OnlyResult stores its elements with their original,
possibly-heterogeneous types, rather than with the common element type, this
may not always be possible. However, when it is possible (e.g., when all
elements have the same original type), assignment of elements should be
supported.

--
Feb 09