www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4355] New: random + take = fail

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4355

           Summary: random + take = fail
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: ellery-newcomer utulsa.edu



18:25:48 PDT ---
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))

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 20 2010
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4355


David Simcha <dsimcha yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dsimcha yahoo.com
         Resolution|                            |FIXED



Fixed 2.048

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 19 2010