On Wednesday, 19 October 2016 at 20:15:14 UTC, Nordlöw wrote:
On Wednesday, 19 October 2016 at 20:13:15 UTC, Nordlöw wrote:
On Wednesday, 19 October 2016 at 20:10:04 UTC, Meta wrote:
Thanks! Add at
https://github.com/nordlow/phobos-next/blob/master/src/algorithm_ex.d#L2234
I would add this: not sure if it's what you're intending or
not, but as `in` expands to `const scope` and the semantics
of scope will probably be changing soon (or more accurately,
actually implemented), you may want to just go with `const`
instead.
Ok, thanks. I updated.
BTW: So what about const ref? Will this differ to `in` with
regards to `scope`? If so will the compiler(s) be smart enough
to not copy the large stack array when I only qualify with
`const`?
Well, scope does not imply ref so in both cases a copy will be
made.