Skip to content

Commit

Permalink
Delete assignment operator which modifies const field
Browse files Browse the repository at this point in the history
  • Loading branch information
colbysparks committed Jul 30, 2024
1 parent 761b932 commit 1c43415
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Rx/v2/src/rxcpp/rx-notification.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ struct notification
on_next_notification(const T& value) : value(value) {}
on_next_notification(const on_next_notification& o) : value(o.value) {}
on_next_notification(const on_next_notification&& o) : value(std::move(o.value)) {}
on_next_notification& operator=(on_next_notification o) { value = std::move(o.value); return *this; }
on_next_notification& operator=(on_next_notification o) { value = std::move(o.value); return *this; };
void out(std::ostream& os) const override {
os << "on_next( ";
detail::to_stream(os, value, 0, 0);
Expand Down Expand Up @@ -155,7 +155,7 @@ struct notification
}
on_error_notification(const on_error_notification& o) : ep(o.ep) {}
on_error_notification(const on_error_notification&& o) : ep(std::move(o.ep)) {}
on_error_notification& operator=(on_error_notification o) { ep = std::move(o.ep); return *this; }
on_error_notification& operator=(on_error_notification o) RXCPP_DELETE;
void out(std::ostream& os) const override {
os << "on_error(";
os << rxu::what(ep);
Expand Down Expand Up @@ -274,7 +274,7 @@ std::ostream& operator<< (std::ostream& out, const recorded<T>& r) {
out << "@" << r.time() << "-" << r.value();
return out;
}

}
namespace rxn=notifications;

Expand Down

0 comments on commit 1c43415

Please sign in to comment.