Problem with coupling shared object symbol visibility with protection

Benjamin Thaut via Digitalmars-d digitalmars-d at puremagic.com
Thu Jan 22 10:43:55 PST 2015


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;


More information about the Digitalmars-d mailing list