Errors in TDPL

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Jun 22 05:48:48 PDT 2010


On 06/22/2010 07:18 AM, bearophile wrote:
> So I suggest to replace that line in the iota() costructor with:
>
> enforce(step != 0);
>
> And then create an empty generator if pastLast<= current (and the step is 1).

Absolutely. I wrote that test to simplify my life, but in the final 
version iota should accept empty ranges.

Andrei


More information about the Digitalmars-d mailing list