std.range's put on arrays needs to change
H. S. Teoh
hsteoh at qfbox.info
Sun Jun 26 10:29:17 UTC 2022
On Sun, Jun 26, 2022 at 06:33:13AM +0000, Kostiantyn Tokar via Digitalmars-d wrote:
[...]
> What should I do if I want to preallocate a slice and copy some input range
> into it? I wouldn't be able to use `std.algorithm.copy` for this simple
> purpose, because it uses `put` internally.
Just take a slice of it with [].
T
--
A computer doesn't mind if its programs are put to purposes that don't match their names. -- D. Knuth
More information about the Digitalmars-d
mailing list