On Thursday, 4 December 2014 at 11:21:27 UTC, Marc Schütz wrote:
Errors for scope violations are only reported in @safe code.

Why? If I've explicitly designated a reference as scope, why should it be ignored in un-@safe code?

Agreed, it should also work for any other code with some function to cast away scope.

ref T unscope(scope ref T t) @system
{
    auto p = &t;
    return *p;
}

Reply via email to