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

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Steven Schveighoffer <[email protected]> ---
Vladimir, would appreciate your input on the PR:
https://github.com/dlang/phobos/pull/5805

Currently, transposed uses `filter` to remove elements from the range
transposition when the underlying column has become empty.

So for instance:

assert([[1,2,3], [4,5], [6,7,8]].transposed.equal([[1,4,6], [2,5,7], [3,8]]);

Note the jaggedness of the range of ranges changes in weird ways, especially
when holes appear in the middle.

While this may be reasonable, it precludes performing opIndex on an element of
the transposed result. So while transposed can be indexed if the ranges
individually can be indexed, the resulting elements cannot be, making your code
example unimplementable.

--

Reply via email to