---
void main()
{
import std.range : iota;
import std.conv : to;
auto length = iota(int.min, int.max).length;
assert(length == uint.max, "opps... length is " ~ length.to!string);
}
---
fails with:
core.exception.AssertError@[snip]: opps... length is 18446744073709551615
----------------
??:? _d_assert_msg [0x18578d52]
??:? _Dmain [0x1855e6cc]
I iota seems work fine with byte, short and long, it's just int that has issues.
Thanks,
David