Struct with default ctor (Was: [dmd-beta] dmd 2.064 beta take 2)

deadalnix deadalnix at gmail.com
Fri May 17 23:59:15 PDT 2013


On Saturday, 18 May 2013 at 05:19:30 UTC, Maxim Fomin wrote:
> On Saturday, 18 May 2013 at 02:34:46 UTC, Andrej Mitrovic wrote:
>> On 5/18/13, Timothee Cour <thelastmammoth at gmail.com> wrote:
>>> S.init should be known at compile time by the spec.
>>
>> But why is this needed?
>
> It is needed in any place where such object is created due to 
> default initialization. However if default ctor is CTFEable, 
> dmd can support this feature.

Another solution is to issue an error when such object isn't 
initialized explicitely. This isn't very difficult to do.


More information about the Digitalmars-d mailing list