Commit b34b4b0d authored by Dominik Charousset's avatar Dominik Charousset

Use standard operator= signatures, close #1168

parent 263645b6
......@@ -129,11 +129,16 @@ public:
return *this;
}
intrusive_ptr& operator=(intrusive_ptr other) noexcept {
intrusive_ptr& operator=(intrusive_ptr&& other) noexcept {
swap(other);
return *this;
}
intrusive_ptr& operator=(const intrusive_ptr& other) noexcept {
reset(other.ptr_);
return *this;
}
pointer get() const noexcept {
return ptr_;
}
......
......@@ -105,11 +105,16 @@ public:
return *this;
}
weak_intrusive_ptr& operator=(weak_intrusive_ptr other) noexcept {
weak_intrusive_ptr& operator=(weak_intrusive_ptr&& other) noexcept {
swap(other);
return *this;
}
weak_intrusive_ptr& operator=(const weak_intrusive_ptr& other) noexcept {
reset(other.ptr_);
return *this;
}
pointer get() const noexcept {
return ptr_;
}
......
......@@ -45,6 +45,8 @@ struct dyn_type_id_list {
other.hash = 0;
}
dyn_type_id_list& operator=(dyn_type_id_list&&) noexcept = delete;
~dyn_type_id_list() {
free(storage);
}
......
......@@ -78,7 +78,6 @@ CAF_TEST(move_assignment) {
x = std::move(y);
CAF_CHECK_EQUAL(x, make_tuple(3, 4));
CAF_CHECK_EQUAL(x.unique(), true);
CAF_CHECK_EQUAL(y.ptr(), nullptr);
}
CAF_TEST(make_cow_tuple) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment