[Issue 19931] Missing error message when defining postblit, rvalue constructor and copy constructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 4 11:07:09 UTC 2019


Simen Kjaeraas <simen.kjaras at gmail.com> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #2 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
Well, duh. What I'm saying it's just as wrong to define all three as it is to
define two of them, and an error message should be present in both cases.

We could perfectly well define that if there's an rvalue constructor and a copy
constructor, one of them takes precedence and the other is ignored. Instead, we
have an error message. The fact that we allow all three to be defined with no
error message is confusing, and leads the programmer to believe there are no
errors even though his carefully-crafted copy constructor is ignored.


More information about the Digitalmars-d-bugs mailing list