Scope Containers

Atila Neves atila.neves at gmail.com
Mon Mar 18 09:07:49 UTC 2019


On Friday, 15 March 2019 at 16:11:43 UTC, bitwise wrote:
> On Wednesday, 13 March 2019 at 13:29:51 UTC, Atila Neves wrote:
>> [...]
>>
>> I introduced a new member function `range` which return a 
>> forward range that keeps a pointer to the vector inside of it. 
>> Coupled with dip1000 it seems to do the trick.
>
> Awesome. I'm trying to test the same thing, but -dip1000 seems 
> to have no effect, and -scope is unrecognized. Do I have to 
> download the beta or GIT HEAD to get a functional DIP1000 
> implementation?
>
> Thanks again,
>     Bit

It definitely has an effect. This code compiles with -dip1000, 
doesn't without:

void main() @safe {
     int i;
     fun(&i);
}

void fun(scope int* i) @safe {

}


Works as intended on dmd 2.085.0 and 2.084.1.


More information about the Digitalmars-d mailing list