no-arg constructor for structs (again)
Timon Gehr
timon.gehr at gmx.ch
Thu Sep 20 08:54:49 PDT 2012
On 09/20/2012 10:11 AM, Felix Hufnagel wrote:
> ...
> but whats even more confusing: you are not allowed to declare an
> no_arg constructor. but you are allowed to declare one where all
> parameters have default parameters. but then, how to call it
> without args? auto k = S(); doesn't work?
>
>
struct S{
this(int=0){}
}
void main(){
S s;
s.__ctor();
}
More information about the Digitalmars-d
mailing list