[Issue 24382] New: std.range.only should have assignable elements

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 10 05:37:46 UTC 2024


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 at puremagic.com
          Reporter: snarwin+bugzilla at 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.

--


More information about the Digitalmars-d-bugs mailing list