April 02
https://issues.dlang.org/show_bug.cgi?id=20876

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #11 from Walter Bright <bugzilla@digitalmars.com> ---
What it could do is examine each field's copy constructor, and pick the most restrictive annotation that is inclusive to all of them. If that doesn't work, then fail.

--
April 02
https://issues.dlang.org/show_bug.cgi?id=20876

--- Comment #12 from Jonathan M Davis <issues.dlang@jmdavisProg.com> ---
(In reply to Walter Bright from comment #11)
> What it could do is examine each field's copy constructor, and pick the most restrictive annotation that is inclusive to all of them. If that doesn't work, then fail.

That would be better, but the ideal situation would involve generating multiple copy constructors if the types being wrapped have multiple, since it is possible to overload copy constructors on qualifiers. Obviously, it could only generate the ones which would work with all of the member variables, so you could easily end up in a situation where only a subset could be generated, but in many cases, it should work to be able to forward all of the overloads of the copy constructor - especially when only one of the member variables has a copy constructor, which will likely be the case a lot of the time.

But either way, right now, as soon as you declare a copy constructor that doesn't work with the default signature, you're just screwed with any implicit copy constructors, since the compiler can't generate one that works.

--
April 30
https://issues.dlang.org/show_bug.cgi?id=20876

--- Comment #13 from Dlang Bot <dlang-bot@dlang.rocks> ---
@RazvanN7 created dlang/dmd pull request #16429 "Implement the generation of multiple copy constructors for fields" mentioning this issue:

- Implement the generation of multiple copy constructors for fields + Fix Bugzilla Issue 20876

https://github.com/dlang/dmd/pull/16429

--
1 2
Next ›   Last »