GDC & Pandaboard/QEMU & Framebuffer

Mike Parker via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 12 05:45:21 PDT 2014


On 10/12/2014 8:08 PM, John A wrote:

>
> I took your recommendation and cloned from DerelictOrg. It failed to
> compile in a couple of files: arb.d and ext.d. All the failures were due
> to the same error, e.g.:
>
> source/derelict/opengl3/arb.d:933: error: user defined attributes cannot
> appear as postfixes
>
> The original line in Derelict3 is:
>    private __gshared bool _ARB_depth_buffer_float;
>    bool ARB_depth_buffer_float() @property { return
> _ARB_depth_buffer_float; }
>
> The line in DerelictOrg is:
>    private __gshared bool _ARB_depth_buffer_float;
>    bool ARB_depth_buffer_float() @nogc nothrow @property { return
> _ARB_depth_buffer_float; }

That means you're using an older version of the D frontend and I didn't 
take that into account when I added @nogc to the extension modules. A 
bugfix release is imminent.

For the curious, to get backward-compatible nogc support into Derelict, 
I've implemented it as a UDA for versions less than 2.066 of the D 
frontend (see derelict.util.system). Until recently, it compiled fine on 
pre-2.066, but when I applied it to the property functions in the 
extension modules, I had no idea that UDAs could not be postfixes and 
that it would break on pre-2.066.

I'm curious about the rationale behind allowing built-in attributes as 
postfixes but not UDAs. I'll see if it's in the docs, but if not, I'd 
like to know what it is. On the surface, it seems unintuitive to 
distinguish between the two.

---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



More information about the Digitalmars-d mailing list