nextPermutation: why possible for dchar but not for char?

Ivan Kazmenko gassa at mail.ru
Sun Dec 29 04:51:34 PST 2013


>> 2. Why does nextPermutation hang up for empty arrays?  I 
>> suppose that's a bug?
>
> I suppose so. Please file it. If it is deemed "illegal", at the 
> very least, it should throw.

My fault, i mis-used it.  The right behavior for ranges of size 0 
and 1 is checked explicitly in the unittests.

Ivan Kazmenko.


More information about the Digitalmars-d-learn mailing list