libycxx

operator · 5 overloads

std::shared_ptr::operator=

Header
<memory>
Scope
std::shared_ptr

Assignment operators

Overloads

  1. constexpr shared_ptr& operator=(const shared_ptr& r) noexcept;
    (1)
  2. template<class Y>
      requires sp-compatible<Y, T>
    constexpr shared_ptr& operator=(const shared_ptr<Y>& r) noexcept;
    (2)
  3. constexpr shared_ptr& operator=(shared_ptr&& r) noexcept;
    (3)
  4. template<class Y>
      requires sp-compatible<Y, T>
    constexpr shared_ptr& operator=(shared_ptr<Y>&& r) noexcept;
    (4)
  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);
    (5)