Re: tupleof vs @safe

2018-03-04 Thread ag0aep6g via Digitalmars-d
On 03/03/2018 12:22 AM, ag0aep6g wrote: So am I missing something or should `tupleof` not be allowed to ignore `private` in `@safe` code? Filed an issue: https://issues.dlang.org/show_bug.cgi?id=18554

Re: tupleof vs @safe

2018-03-02 Thread ag0aep6g via Digitalmars-d
On 03/03/2018 12:22 AM, ag0aep6g wrote: But what about `tupleof`? It ignores `private` and it's allowed in `@safe` code: [...] Now that I've sent this, I find the affected Phobos type I couldn't pinpoint. It's `File`: void main() @safe { import std.stdio: File,

tupleof vs @safe

2018-03-02 Thread ag0aep6g via Digitalmars-d
As far as I understand, this is generally how ref counting is supposed to be done, and with a simple payload like `int` it's supposed to be properly safe already: module my_rc_thingy; struct RCint { import core.stdc.stdlib: free, malloc; private static struct Store {