Static Length Propagation of Ranges

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 19 13:15:14 PDT 2016


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`?


More information about the Digitalmars-d-learn mailing list