Blogpost about the T.init problem

Nick Treleaven nick at geany.org
Mon Jul 23 14:26:17 UTC 2018


On Wednesday, 11 July 2018 at 07:30:59 UTC, FeepingCreature wrote:
> To reproduce the format issue, try to print the struct with 
> writefln!"%s"(MyDomainType()).

I implemented the compile time format string checking by 
evaluating `format(fmtStr, Args.init)` at compile time and seeing 
if an exception was thrown. So the above problem could be worked 
around by guarding the invariant test with a check that CTFE is 
not active.


More information about the Digitalmars-d-announce mailing list