Opaque structs

Johannes Pfau nospam at example.com
Fri Jun 28 13:08:33 PDT 2013


Am Fri, 28 Jun 2013 03:40:31 +0200
schrieb Andrej Mitrovic <andrej.mitrovich at gmail.com>:

> struct S
> {
>     @disable("S is an opaque C type and must only be used as a
> pointer") this();
> 
>     @disable("S is an opaque C type and must only be used as a
> pointer") this(this);
> }

A naive question: Why isn't struct S {} enough? This should be a struct
with size 0 so why do we need to disable the constructor and postblit
explicitly?


More information about the Digitalmars-d-learn mailing list