There are uses in Phobos where workaround 1) would require some code changes:

private @property File trustedStdout() @trusted { return stdout; }

void write(T...)(T args) if (!is(T[0] : File))
{
    trustedStdout.write(args);
}

My workaround so far:

export struct _impl1
{
  package @property static File trustedStdout() @trusted { return stdout; }
}

alias trustedStdout = _impl1.trustedStdout;

Reply via email to