http://d.puremagic.com/issues/show_bug.cgi?id=5170

           Summary: std.algorithm.copy "works" for non-assignable ranges
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-11-05 10:03:26 PDT ---
The following code compiles and runs (??????)

import std.algorithm;

struct DummyRange {
    int front() { return 1; }
    void popFront() {}
    enum bool empty = false;
}

void main() {
    auto arr = [1,2,3];
    DummyRange dummyRange;
    copy(arr, dummyRange);
}

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

Reply via email to