foreach counter now must be size_t ?
Tony
tonytdominguez at aol.com
Wed Feb 6 15:24:34 UTC 2019
On Tuesday, 5 February 2019 at 21:14:17 UTC, Rubn wrote:
> On Tuesday, 5 February 2019 at 04:53:00 UTC, Walter Bright
> wrote:
>> I.e. where the array bounds are known at compile time, then it
>> works, because:
>>
>> enum long l = 3;
>> uint i = l;
>>
>> also works.
>
>
> WHAT. WHAT. Where do you see an assignment from size_t to int
> here?
>
> int[] arr = someRandomArray();
> for( int i = 0; i < arr.length; ++i ) {
> dg( i, arr[i] );
> }
>
> ???
Seems that the size_t would have to be a compiler variable we
don't see, but would be nice to have this answered.
More information about the Digitalmars-d
mailing list