foreach counter now must be size_t ?

Dukc ajieskola at gmail.com
Tue Feb 5 11:53:13 UTC 2019


On Tuesday, 5 February 2019 at 03:15:03 UTC, Timon Gehr wrote:
>
> I wish it wasn't. It seems this doesn't do anything useful

It does! Even I, who contribute only occasionally, have more than 
once submitted a PR to Phobos that passes my local 32-bit tests, 
but fails on the GitHub autotester. And the reason is precisely 
because I tend to accidently assign size_t to int or uint.

With this change, I can now immediately detect when I make that 
error, and I don't think I'm the only 32-bit user who makes them.


More information about the Digitalmars-d mailing list