[Issue 20424] A constructor with a value argument of the same type as being constructed should be an error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 2 10:54:52 UTC 2019


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

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 issue is invalid. That is not a copy constructor, it is a normal
constructor so there is no threat of entering in infinite recursion. The reason
why it works is that the compiler simply blitts the contents of a into the
stack of the constructor. I don't see any problem with this.

--


More information about the Digitalmars-d-bugs mailing list