Skip to content

Commit

Permalink
shared_ptr: remove deprecated lw_shared_ptr assignment operator
Browse files Browse the repository at this point in the history
The assignment operator was deprecated in 8038c13 ("shared_ptr:
deprecate lw_shared_ptr operator=(T&&)"), more than a year ago. It
is safe to remove it now.

Closes #2456
  • Loading branch information
avikivity authored and nyh committed Sep 26, 2024
1 parent 3c9c269 commit 03db01b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions include/seastar/core/shared_ptr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ public:
lw_shared_ptr& operator=(std::nullptr_t) noexcept {
return *this = lw_shared_ptr();
}
[[deprecated("call make_lw_shared<> and assign the result instead")]]
lw_shared_ptr& operator=(T&& x) noexcept {
this->~lw_shared_ptr();
new (this) lw_shared_ptr(make_lw_shared<T>(std::move(x)));
return *this;
}

T& operator*() const noexcept { return *accessors<T>::to_value(_p); }
T* operator->() const noexcept { return accessors<T>::to_value(_p); }
Expand Down

0 comments on commit 03db01b

Please sign in to comment.