Summary: std.range.ElementType does not handle output ranges;
                    breaks std.algorithm.copy, etc.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos

--- Comment #0 from Rob Jacques <> 2010-09-17 08:15:33 PDT ---
As of 2.049 ElementType is defined as follows:

template ElementType2(R)
    //alias typeof({ R r; return front(r[]); }()) ElementType;
    static if (is(typeof({return R.init.front();}()) T))
        alias T ElementType;
        alias void ElementType;

However, the only function required of output ranges is: put(r, e)

Here is a simple test case using std.algorithm.copy and std.range.appender

import std.range;
import std.algorithm;

void main(string[] args) {
    string  str;
    copy("hello world",appender(&str));

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to