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
The issue appears to be that the assignment operators of on_next_notification and on_error_notification attempt to modify a private const field here and here, respectively. Apparently this compiles in older versions of gcc because it was simply not attempting to check assignments inside of templates, unless the templates are being used. With this change in gcc 14 however, simple assignments are now checked even inside of templates. This would be my guess as to why this code now fails to compile.
The fix seems to be to simply delete the assignment operator for on_next_notification and on_error_notification, as the two structs are only ever instantiated as shared_ptr so it is not needed. In any case, compilation will fail with older versions of gcc if a user writes code which causes a variant of the assignment operator template to be generated.
Edit: The project I've been working on uses RxCpp v4.1.1, but apparently the const declaration of the T value field of on_next_notification has been removed on master.
The text was updated successfully, but these errors were encountered:
Compiling a simple program which includes rx-includes.hpp fails with gcc 14.
The issue appears to be that the assignment operators of
andon_next_notification
on_error_notification
attempt to modify a private const fieldhereand here, respectively. Apparently this compiles in older versions of gcc because it was simply not attempting to check assignments inside of templates, unless the templates are being used. With this change in gcc 14 however, simple assignments are now checked even inside of templates. This would be my guess as to why this code now fails to compile.The fix seems to be to simply delete the assignment operator for
andon_next_notification
on_error_notification
, as the two structs are only ever instantiated asshared_ptr
so it is not needed. In any case, compilation will fail with older versions of gcc if a user writes code which causes a variant of the assignment operator template to be generated.Edit: The project I've been working on uses RxCpp v4.1.1, but apparently the const declaration of the
T value
field ofon_next_notification
has been removed on master.The text was updated successfully, but these errors were encountered: