Ah, idup. Too obvious, but I missed it. Thanks. Pelle Wrote:
> std.algorithm.copy will copy an input range into an output range. An > array is a valid output range, but does not append as you seem to > expect. Instead, it fills the array. > > int[] a = new int[](3); > copy([1,2,3],a); > assert (a == [1,2,3]); > > To get an output range which appends to an array, use appender. > > In this case, however, you simply want buffer.idup; :-)