Bug 4355 – random + take = fail

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2010-06-20T18:25:00Z
Last change time
2010-08-19T21:52:14Z
Assigned to
nobody
Creator
ellery-newcomer

Comments

Comment #0 by ellery-newcomer — 2010-06-20T18:25:48Z
code: import std.stdio; import std.range; import std.random; void main(){ Random r = rndGen(); foreach(i; take(r,5)){ writeln("hi ",i); } } gives: /usr/lib/dmd-2.047/src/phobos/std/range.d(1289): Error: template std.range.moveFront(R) if (is(typeof(&r.front()) == ElementType!(R)*)) does not match any function template declaration /usr/lib/dmd-2.047/src/phobos/std/range.d(1289): Error: template std.range.moveFront(R) if (is(typeof(&r.front()) == ElementType!(R)*)) cannot deduce template function from argument types !()(MersenneTwisterEngine!(uint,32,624,397,31,-1727483681u,11,7,-1658038656u,15,-272236544u,18))
Comment #1 by dsimcha — 2010-08-19T21:52:14Z
Fixed 2.048