DIP1000: Scoped Pointers (Discussion)

Robert burner Schadek via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 11 04:46:31 PDT 2016


Can I do this:

```
struct Foo { int a; }
auto rcs = RefCountedSlice!Foo(); // assume rcs.length > 0

scope Foo zero = rcs[0];
zero.a = 1337;
assert(rcs[0].a == 1337);
```

with the DIP. I could find it.


More information about the Digitalmars-d mailing list