Skip to content

Commit 1c43415

Browse files
committed
Delete assignment operator which modifies const field
1 parent 761b932 commit 1c43415

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Rx/v2/src/rxcpp/rx-notification.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ struct notification
127127
on_next_notification(const T& value) : value(value) {}
128128
on_next_notification(const on_next_notification& o) : value(o.value) {}
129129
on_next_notification(const on_next_notification&& o) : value(std::move(o.value)) {}
130-
on_next_notification& operator=(on_next_notification o) { value = std::move(o.value); return *this; }
130+
on_next_notification& operator=(on_next_notification o) { value = std::move(o.value); return *this; };
131131
void out(std::ostream& os) const override {
132132
os << "on_next( ";
133133
detail::to_stream(os, value, 0, 0);
@@ -155,7 +155,7 @@ struct notification
155155
}
156156
on_error_notification(const on_error_notification& o) : ep(o.ep) {}
157157
on_error_notification(const on_error_notification&& o) : ep(std::move(o.ep)) {}
158-
on_error_notification& operator=(on_error_notification o) { ep = std::move(o.ep); return *this; }
158+
on_error_notification& operator=(on_error_notification o) RXCPP_DELETE;
159159
void out(std::ostream& os) const override {
160160
os << "on_error(";
161161
os << rxu::what(ep);
@@ -274,7 +274,7 @@ std::ostream& operator<< (std::ostream& out, const recorded<T>& r) {
274274
out << "@" << r.time() << "-" << r.value();
275275
return out;
276276
}
277-
277+
278278
}
279279
namespace rxn=notifications;
280280

0 commit comments

Comments
 (0)