nextPermutation: why possible for dchar but not for char?

Ivan Kazmenko gassa at mail.ru
Sun Dec 29 04:25:37 PST 2013


On Saturday, 28 December 2013 at 23:07:21 UTC, monarch_dodra 
wrote:
>> Also, the example at
>> http://dlang.org/phobos/std_algorithm.html#nextPermutation
>> is wrong:
>> while (nextPermutation(a)) { }
>> should in fact be
>> do { } while (nextPermutation(a));
>> as above, or we miss the very first permutation.
>
> Noted. I'll try to fix that in the comming days. Or if anybody 
> else submits the pull, I'll merge it (*hint* *hint*, *wink*)

Here it is:
https://github.com/D-Programming-Language/phobos/pull/1822
Or should it have been done in a separate branch?..  The 
bugtracker (http://d.puremagic.com/issues/) seems to be down at 
the moment, so there's no issue associated with it.

Ivan Kazmenko.


More information about the Digitalmars-d-learn mailing list