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; else 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)); return; }
Sorry, I misread the signature of copy(), leading me to think this was important to the bug, etc. See bug 4880