extern opaque struct

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Sun Aug 23 15:36:02 PDT 2015


On Sunday, 23 August 2015 at 22:20:26 UTC, John Colvin wrote:
> Let's say I have some C headers that have code like this in:
>
> extern struct UndeclaredStruct blah;
> Undeclared *p = &blah;
>
> which would naïvely translate to D as:
>
> struct UndeclaredStruct;
> extern UndeclaredStruct blah;
> auto p = &blah;
>
> which doesn't compile. Why not? Neither the size nor any 
> default initialiser is needed.

s/Undeclared /UndeclaredStruct/


More information about the Digitalmars-d mailing list