isInfinite isInadequate

Peter Alexander peter.alexander.au at gmail.com
Wed Oct 17 05:45:05 PDT 2012


On Wednesday, 17 October 2012 at 12:33:54 UTC, monarch_dodra 
wrote:
> Technically, cycle([]) *is* isInfinite, but the program will 
> assert because of a run-time error due to the user's logic. 
> Nobody said that just because a range is infinite, that it 
> can't ever fail...

cycle([]) is not infinite. A infinitely repeated empty range is 
the empty range.


More information about the Digitalmars-d mailing list