Would love to override default ctor of struct
Guillaume Piolat
first.last at gmail.com
Wed Jan 23 13:02:43 UTC 2019
On Saturday, 19 January 2019 at 10:05:22 UTC, Dru wrote:
> What is the idea behind why we can't define default ctor for
> structs?
>
> In current situation I need to "@disable this()"
> then define a constructor with dummy arguments (because my
> constructor does not need arguments)
>
> It is a big pain on syntax
Short answer: make T.init a value, and have your destructor be
able to deal with T.init
More information about the Digitalmars-d
mailing list