Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::shared_ptr >> std::experimental::shared_ptr assignment from std::auto_ptr

Takes ownership of the value held by the supplied std::auto_ptr instance, replacing the value currently held. Decreases the use_count() for the old value.

template<typename Other,typename Deleter>
shared_ptr& operator=(std::auto_ptr<Other,Deleter>&& other) noexcept;

Effects:
shared_ptr& operator=(std::auto_ptr<Other,Deleter>&& other) noexcept{
    shared_ptr temp(std::move(other));
    this->swap(temp);
    return *this;
}
Header

#include <experimental/atomic>

See Also