[Issue 20876] DMD gives out not so helpful compile error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 29 07:58:52 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20876
--- Comment #5 from moonlightsentinel at disroot.org ---
(In reply to RazvanN from comment #4)
> The fix in this situation would be to annotate the copy constructor of Bar
> with `inout`: this(ref inout(Bar)) inout . That will make the code to
> compile.
That doesn't work if the struct contains indirections, e.g. when you add a
mutable pointer to Bar...
--
More information about the Digitalmars-d-bugs
mailing list