Pop Quiz what is wrong with this code?

Avrina avrina12309412342 at gmail.com
Sat Jun 20 23:36:25 UTC 2020


On Saturday, 20 June 2020 at 18:15:27 UTC, Steven Schveighoffer 
wrote:
> On 6/20/20 12:00 PM, Danni Coy wrote:
>
>> I tried explicitly making x and y ints and I got a 
>> depreciation warning.
>
> foreach(ptrdiff_t y, ref row; offsetMap)
>
> is that what you wanted?
>
> ptrdiff_t is the signed version of size_t. The complaint is not 
> that you are converting from unsigned to signed, but that you 
> are converting from 64-bit to 32-bit.
>
> -Steve

Why isn't that deprecated as well? implicitly converting from 
ulong to long is an error as much as ulong to uint.


More information about the Digitalmars-d mailing list