[Issue 20695] Copy constructor disable default struct constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 26 08:32:56 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20695

--- Comment #4 from Mathias LANG <pro.mathias.lang at gmail.com> ---
> It's always been the case that implementing opCall or a constructor disables struct literals and initializers

`opCall` does not disable literals. And it technically *hides* constructors,
I'm sure there are some convoluted way to show it.

> This is not related to copy constructors: [...]

I'm well aware of the disappearance of default ctors in the presence of a
single definition. While I would like for us to have a way to control it, a la
"this() = default" (from C++), copy ctors are not *regular* ctors, and I don't
think they should disable the default constructors.

--


More information about the Digitalmars-d-bugs mailing list