[Issue 16724] New: RandomCover.popFront is a no-op for the first call
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Nov 22 18:36:12 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16724
Issue ID: 16724
Summary: RandomCover.popFront is a no-op for the first call
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: dlang at supradigital.org
I let the code speak for itself.
import std.random;
import std.range;
import std.algorithm;
void main ()
{
auto range = iota(10);
auto randy = range.randomCover;
//randy.front // uncomment this and the assert works
randy.popFront;
assert(randy.array.length == range.length - 1);
}
--
More information about the Digitalmars-d-bugs
mailing list