[Issue 16255] std.algorithm.iteration.each on opApply doesn't support ref

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Dec 22 18:04:46 PST 2016


https://issues.dlang.org/show_bug.cgi?id=16255

greenify <greeenify at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greeenify at gmail.com

--- Comment #2 from greenify <greeenify at gmail.com> ---
> Except it doesn't work. When each accepts the iterable, it accepts it by value. It should accept it by reference (if it's a class, it could take the class reference by value). Otherwise, the point of using ref throughout each is kind of useless.

A simple solution with `auto ref` for Iterables:

https://github.com/dlang/phobos/pull/4991

--


More information about the Digitalmars-d-bugs mailing list