[Dlang-internal] DIP1000 discussion and testing: borrowing a range

Walter Bright via Dlang-internal dlang-internal at puremagic.com
Sat Oct 22 00:25:00 PDT 2016


On 10/21/2016 10:38 AM, Martin Nowak wrote:
> Scope was supposed to apply to the return value, comare
> https://github.com/dlang/DIPs/blob/731255ed7dc37d596fec0552013f0e12c68f7bea/DIPs/DIP1000.md#scope-function-returns.
>
>
> Let's maybe work with a better equivalent example.
>
> @safe scope Klass get(return scope ref Unique!Klass);

Please use simple examples. 'scope' has nothing to do with templates, and adding 
in templates just distracts and confuses.


More information about the Dlang-internal mailing list