T.init and @disable this
Andrej Mitrovic
andrej.mitrovich at gmail.com
Thu Oct 4 06:28:52 PDT 2012
On 10/4/12, monarch_dodra <monarchdodra at gmail.com> wrote:
> I'm trying to find out the exact semantics of
>
> @disable this();
Also this still works:
struct Foo
{
@disable this();
}
void main()
{
Foo foo = Foo();
}
I really don't know why though.. Isn't this a bug? A workaround in
user-code is defining a disabled static opCall:
struct Foo
{
@disable this();
@disable static void opCall();
}
More information about the Digitalmars-d
mailing list