std.algorithm.copy target not passed by reference (bug?)
Johannes Pfau
nospam at example.com
Thu Aug 9 06:32:36 PDT 2012
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 instead of
the range itself, but is there any reason why we can't just add a 'ref'
to the target range parameter?
More information about the Digitalmars-d-learn
mailing list