@disable this for structs
Namespace
rswhite4 at googlemail.com
Thu Feb 27 10:42:40 PST 2014
On Thursday, 27 February 2014 at 18:26:10 UTC, Steve Teale wrote:
> 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?
aye
More information about the Digitalmars-d-learn
mailing list