Warnings/What should I know?
simendsjo
simendsjo at gmail.com
Fri Oct 18 00:02:49 PDT 2013
On Friday, 18 October 2013 at 06:56:49 UTC, monarch_dodra wrote:
(...)
> struct S
> {
> this(int i = 5)
> {}
> }
> S s = S(); //Does *not* call the constructor with the value 5.
I didn't know that. In that case, I think struct ctors with only
optional parameters should be illegal - how is it possible to
call it?
Struct ctors without parameters is already illegal due to .init.
More information about the Digitalmars-d-learn
mailing list