Invariant for default construction

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Mon Nov 17 22:13:19 PST 2014


On Monday, 17 November 2014 at 20:51:36 UTC, Walter Bright wrote:
> Not only that, the runtime check would occur every time an 
> object is created, yet the .init will always be the same. Doing 
> this check would, I fear, cause people to disable invariants as 
> not worth the expense.

If it's init data it is know at compile time right?
Couldn't we try to run the invariant for the init state once in 
CTFE?


More information about the Digitalmars-d mailing list