operator · 5 overloads
std::shared_ptr::operator=
- Header
<memory>- Scope
std::shared_ptr- cppreference
- std::shared_ptr::operator=
Assignment operators
Overloads
- (1)
constexpr shared_ptr& operator=(const shared_ptr& r) noexcept; - (2)
template<class Y> requires sp-compatible<Y, T> constexpr shared_ptr& operator=(const shared_ptr<Y>& r) noexcept; - (3)
constexpr shared_ptr& operator=(shared_ptr&& r) noexcept; - (4)
template<class Y> requires sp-compatible<Y, T> constexpr shared_ptr& operator=(shared_ptr<Y>&& r) noexcept; - (5)
template<class Y, class D> requires is_constructible_v<shared_ptr, unique_ptr<Y, D>> constexpr shared_ptr& operator=(unique_ptr<Y, D>&& r);