std.format and uninitialized elements in CTFE

kinke noone at nowhere.com
Thu Dec 5 19:56:35 UTC 2019


On Thursday, 5 December 2019 at 18:37:03 UTC, berni44 wrote:
> Should std.format check if the members of a struct are not 
> initialized and do what in that case?

It shouldn't, and there's no such thing as uninitialized 
struct/class *members*, there are only uninitialized whole struct 
instances. There are surely bugzillas wrt.

struct S { int bla = void; }

having no effect (correct way: `S s = void`). IMO, void member 
initializers should be invalid to make that clear.


More information about the Digitalmars-d mailing list