[Issue 20695] Copy constructor disable default struct constructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 26 02:32:32 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20695
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |razvan.nitu1305 at gmail.com
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
This is not related to copy constructors:
struct K
{
int a;
string b;
this(int, int, int) {}
}
void main()
{
K s = K(7, "gigi");
}
It seems that once you define a constructor, you are not able to use the
default constructor.
--
More information about the Digitalmars-d-bugs
mailing list