Thread overview
[Issue 15798] std.algorithm.mutation.copy takes target by value
Mar 21, 2016
Ender KaShae
Oct 03, 2017
Eduard Staniloiu
Jan 16, 2018
Jack Stouffer
Jan 17, 2018
Jack Stouffer
Dec 17, 2022
Iain Buclaw
March 21, 2016
https://issues.dlang.org/show_bug.cgi?id=15798

Ender KaShae <astrothayne@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |astrothayne@gmail.com

--- Comment #1 from Ender KaShae <astrothayne@gmail.com> ---
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.

--
October 03, 2017
https://issues.dlang.org/show_bug.cgi?id=15798

Eduard Staniloiu <edi33416@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |edi33416@gmail.com
           Assignee|nobody@puremagic.com        |edi33416@gmail.com

--
January 16, 2018
https://issues.dlang.org/show_bug.cgi?id=15798

Jack Stouffer <jack@jackstouffer.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jack@jackstouffer.com

--- Comment #2 from Jack Stouffer <jack@jackstouffer.com> ---
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

--
January 17, 2018
https://issues.dlang.org/show_bug.cgi?id=15798

--- Comment #3 from Jack Stouffer <jack@jackstouffer.com> ---
https://github.com/dlang/phobos/pull/6039

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=15798

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 01
https://issues.dlang.org/show_bug.cgi?id=15798

--- Comment #4 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/phobos/issues/10167

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--