On Sunday, 15 May 2016 at 15:33:24 UTC, Joseph Rushton Wakeling
wrote:
I think you may have discovered a bug in `isForwardRange`
Less a bug than a subtlety, it seems. Because of this line:
https://github.com/dlang/phobos/blob/778593d805a0c8bf39e318163e6d4004a7357904/std/range/primitives.d#L790
... the wrapper using `alias this` doesn't count as a forward
range, because the result of `.save` is of the same type as the
underlying RNG, rather than the wrapper itself.
The `.save` method still exists, though, although it's probably
unlikely to be used in practice because `isForwardRange`
evaluates to false.