struct: default construction or lazy initialization.

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 31 17:52:40 PST 2017


On Wednesday, 1 February 2017 at 00:43:39 UTC, bitwise wrote:
> Container!int c; // = Container!int() -> can't do this.

Can you live with

Container!int c = Container!int.create();

because D supports that and can force the issue with `@disable 
this();` which causes compilation to fail any place where it 
isn't explicitly initialized.


More information about the Digitalmars-d-learn mailing list