Re: std.algorithm.copy target not passed by reference (bug?)

2012-08-09 Thread Ali Çehreli
On 08/09/2012 06:32 AM, Johannes Pfau wrote: > I just saw that the target range passed to std.algorithm.copy is not > passed by reference. So for a range which is implemented as a simple > struct value type and which modifies some internal state a call to copy > does not have any effect. I think

std.algorithm.copy target not passed by reference (bug?)

2012-08-09 Thread Johannes Pfau
I just saw that the target range passed to std.algorithm.copy is not passed by reference. So for a range which is implemented as a simple struct value type and which modifies some internal state a call to copy does not have any effect. It can be worked around by passing a pointer to that range inst