Comment #0 by destructionator — 2016-03-15T00:10:49Z
See: http://stackoverflow.com/a/36000424/1457000
Try copying into a MD5. It is recognized as an output range and triggers the overload that just calls put(dst, src), but since the target was passed by value, the change is not seen on the outside!
Comment #1 by astrothayne — 2016-03-21T06:40:47Z
Simply changing the Target to a ref wouldn't be backward compatible, because then it wouldn't be possible to use an rvalue as a target, which is useful for copying to an array slice, or using a range that wraps another output range, such as retro.
Also, std.range.put _does_ take a reference, and can be used to copy a range. Alternatively, copy returns the state of the output range after copying, so in the MD5 example you could use `s.copy(d2).finish().toHexString` to get the correct MD5 sum.
Comment #2 by jack — 2018-01-16T17:53:14Z
To be honest, the behavior of copy really only makes sense for array targets. It doesn't make any sense to return the "remainder" of a generic output range.
copying to non-arrays should be deprecated