The section of the language spec on default struct initialization [1] contains the following statement: > The default initializers may not contain references to mutable data. However, this statement is false. References to mutable data are allowed in default initializers of struct fields, and have been since at least DMD 2.060 (the oldest compiler available on run.dlang.io). [1] https://dlang.org/spec/struct.html#default_struct_init
@pbackus created dlang/dlang.org pull request #3447 "Fix 23436 - Spec falsely states mutable references in struct .init ar…" fixing this issue: - Fix 23436 - Spec falsely states mutable references in struct .init are forbidden https://github.com/dlang/dlang.org/pull/3447
dlang/dlang.org pull request #3447 "Fix 23436 - Spec falsely states mutable references in struct .init ar…" was merged into master: - 4a0af0866a28d7f196406d9266971ea93e45ff61 by Paul Backus: Fix 23436 - Spec falsely states mutable references in struct .init are forbidden https://github.com/dlang/dlang.org/pull/3447