On 2/23/15 2:15 PM, Walter Bright wrote:
This is pretty straightforward.
[snip]

The code builds if you slap a "@safe:" at the top. There is one bug in the compiler: "delete" must not be allowed in @safe code. The destructor must be @trusted.

Understanding that this code (sans delete) is @safe (and the contribution of DIP25 to that) is of paramount importance.

Making it possible to define @safe structs that are still able to return reference to their internals is crucial. It paves the way for truly safe reference counted classes.


Andrei

Reply via email to