Struct Constructors

Mark Blume via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 16 15:03:27 PDT 2014


Why exactly isn't a constructor without any parameters is not 
allowed?
Why does
"Struct()" calls "Struct.opCall()," which means "Struct.init" 
initially,
while
"Struct(params)" calls "Struct.this(params)?"

Does "Struct(params)" also call "Struct.opCall(params)?"

I am new to D and I can't seem to understand this.


More information about the Digitalmars-d-learn mailing list