Error about @disabled constructor when there is a custom one
Simen Kjaeraas
simen.kjaras at gmail.com
Tue Jan 22 23:59:50 PST 2013
On 2013-45-23 04:01, deadalnix <deadalnix at gmail.com> wrote:
> On Tuesday, 22 January 2013 at 19:07:56 UTC, Simen Kjaeraas wrote:
>> One could argue that the compiler should choose the other constructor,
>> and
>> even that having default constructors is reasonable. However, D has gone
>> the route of not having default constructors for structs. Instead,
>> structs are defined to be trivially constructible from T.init.
>>
>
> Which incompatible with the desire of a NonNull construct.
Really? It's not like you cannot @disable T.init. Please show how this is
a problem for NonNull!T.
> Cheap workaround as you cannot new.
Indeed. But it's what we've got.
--
Simen
More information about the Digitalmars-d
mailing list