You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
This seems to be caused by the implicit member-wise copying having no opt-out option, as it'll copy the storage before potentially deleting it with the set_name function.
The text was updated successfully, but these errors were encountered:
The general operator= should default-initialize the storage and set the discriminator to -1.
Better yet, overload operator=: (inout this, that); to not assign {} to the storage.
Describe the bug
Copying a union can result in invalid pointers errors.
To Reproduce
Sample code:
Commands:
Expected result:
Program runs without error.
Actual result/error:
Additional context
This seems to be caused by the implicit member-wise copying having no opt-out option, as it'll copy the storage before potentially deleting it with the
set_name
function.The text was updated successfully, but these errors were encountered: