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

Jonathan M Davis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m

--- Comment #5 from Jonathan M Davis <[email protected]> ---
(In reply to monarchdodra from comment #4)
> I did some extra thinking about this, and this might be invalid. While one
> might "expect" opAssign to be called, doing this would mean it is impossible
> to have a strong exception safe behavior should one of the assignements
> fails.

IIRC, isn't opAssign actually supposed to assign to a copy and then have the
result blitted into the variable that you're actually assigning to in order to
make it exception safe like you're concerned about? The extension of that would
be to do opAssign into a copy of the static array, and then blit it into the
original afterwards. I'm not sure how desirable that is, but it would be an
extension of what happens with opAssign in general (assuming that I'm
remembering that right).

--

Reply via email to