Bug 2897 – RandomCover docs wrong: RandomCover needs a random access range.

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2009-04-25T08:44:00Z
Last change time
2015-06-09T01:26:26Z
Assigned to
andrei
Creator
dsimcha

Comments

Comment #0 by dsimcha — 2009-04-25T08:44:55Z
From RandomCover docs: "Covers a given range r in a random manner, i.e. goes through each element of r once and only once, just in a random order. r must be a forward access range with length." Reading the source code, it's clear that RandomCover really needs random access: ref ElementType!(Range) front() { return _input[_current]; }