On Friday, 10 June 2022 at 07:49:43 UTC, Mike Parker wrote:
And it *is* documented:

Struct fields are by default initialized to whatever the Initializer for the field is, and if none is supplied, to the default initializer for the field's type.
The default initializers are evaluated at compile time.

https://dlang.org/spec/struct.html#default_struct_init

Yes, that section I find open for interpretation, because I don't think pointer values can be determined at compiler time. I assume S.init is constructed at program initialization, which is then blitted into any new instance of S.

-- Bastiaan.

Reply via email to