[Issue 24562] inout on the copy constructor makes it so that a normal opAssign does not work with multiple layers of objects

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 27 09:41:20 UTC 2024


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
(In reply to Jonathan M Davis from comment #1)
> Okay. In our current situation we were able to work around the issue via
> explicit opAssigns, so I reduce this from being marked as a blocker, but in
> cases where you're dealing with templated code outside your control, that
> won't work. So, this is still a major issue.

My hunch is that the generated opAssign is probably using some code internally
that copy constructs an instance of S1 but it mismatches some qualifiers.
Deleting the copy constructor probably fixes this because it can then do some
implicit blitting. Will check now.

--


More information about the Digitalmars-d-bugs mailing list