January 28, 2016
This works:

    int[][] a;
    RandomAccessFinite!(int[]) r = inputRangeObject(a);

What would be a good way to achieve something equivalent to this?:

    int[][] a;
    RandomAccessFinite!(RandomAccessFinite!int) r = inputRangeObject(a);
January 27, 2016
On 01/27/2016 08:59 PM, Luís Marques wrote:
> This works:
>
>      int[][] a;
>      RandomAccessFinite!(int[]) r = inputRangeObject(a);
>
> What would be a good way to achieve something equivalent to this?:
>
>      int[][] a;
>      RandomAccessFinite!(RandomAccessFinite!int) r = inputRangeObject(a);

All I can say is the following compiles. I hope it works too. :)

import std.range;
import std.algorithm;
import std.conv;

void main() {
    int[][] a;
    RandomAccessFinite!(RandomAccessFinite!int) r
        = inputRangeObject(
            a.map!(e => inputRangeObject(e).to!(RandomAccessFinite!int)));
}

Instead of to!(RandomAccessFinite!int) one can use the cast operator as well.

Ali