@disable this for structs
Steve Teale
steve.teale at britseyeview.com
Thu Feb 27 10:26:09 PST 2014
On Thursday, 27 February 2014 at 18:13:43 UTC, Namespace wrote:
> On Thursday, 27 February 2014 at 18:10:38 UTC, Steve Teale
> wrote:
>> Could someone please explain what you would use this for to an
>> old man rooted in C++, but who loves D.
>>
>> Where does it fit in relative to 42?
>>
>> ;=(
>>
>> Steve
>
> It's for explicit initialization:
>
> struct Foo { }
>
> Foo f; // no problem
>
> struct Bar {
> @disable this();
> }
>
> Bar b; // error
So it is just a reminder that you need to initialize Bar in some
specific way?
More information about the Digitalmars-d-learn
mailing list