std.stdio.tmpfile() return shared(_IO_FILE)* and not File

simendsjo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Aug 24 10:59:40 PDT 2014


On 08/24/2014 07:56 PM, simendsjo wrote:
> Using DMD 2.066 on GNU/Linux x86_64.
> 
> This is strange:
> 
> import std.stdio;
> void main() {
>     auto f = tmpfile();
>     pragma(msg, typeof(f)); // shared(_IO_FILE)*
> }
> 
> But stdio.d looks like the following:
>     static File tmpfile() @safe
> 
> What is going on here?
> 

Oh, and ldc 0.14 and gdc 4.9.1 has the same result, so it's not a
backend thing at least.


More information about the Digitalmars-d-learn mailing list