On Thursday, 4 November 2021 at 11:26:30 UTC, Andrey Zherikov wrote:
I have the following code example:

[...]

A[5] a;
ulong[] idx = [1,3,4];

[...]

    return idx.map!(_ => a[_]);

How can one make the type of idx's elements portable (compile with -m32 to see what the problem is)? This seems to be an surprisingly nontrivial issue at least in C [1].

[1] <https://stackoverflow.com/questions/3174850/what-is-the-correct-type-for-array-indexes-in-c>

Reply via email to