[Issue 22785] joiner does not support range over immutable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Apr 18 13:44:16 UTC 2023


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

--- Comment #2 from FeepingCreature <default_357-line at yahoo.de> ---
The example was rubbish. How about this:

```
void main()
{
    import std.algorithm : joiner, map;
    import std.array : array;

    static immutable struct S
    {
        int[] arr;
    }

    auto range = [S([3]), S([4, 5])];

    assert(range.map!"a.arr".joiner.array == [3, 4, 5]);
}
```

--


More information about the Digitalmars-d-bugs mailing list