no-arg constructor for structs (again)

Felix Hufnagel suicide at xited.de
Wed Sep 19 15:12:04 PDT 2012


isn't it even worse?

import std.stdio;
struct S
{
     int i;
     this(void* p = null){this.i = 5;}
}
void main()
{
     //S l(); //gives a linker error
     auto k = S();
     writeln(k.i); //prints 0
}


More information about the Digitalmars-d mailing list