[Issue 13016] Can't create std.typecons.Nullable!int from the index variable of a foreach loop

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 2 02:08:59 PDT 2014


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

bearophile_hugs at eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs at eml.cc

--- Comment #1 from bearophile_hugs at eml.cc ---
Note that array indexes are size_t, that are implicitly convertible to int only
on 32 bit systems. This program compiles and works on 32 bits. And on 64 bit
systems it can't work, you have to write "foreach (int i, n; arr)" or to use a
cast.

--


More information about the Digitalmars-d-bugs mailing list