https://issues.dlang.org/show_bug.cgi?id=12188 --- Comment #6 from hsteoh at quickfur.ath.cx --- Well, I'm out of ideas. Seems the only way around this is to make nextPermutation require a random access range. :-( --