Documentation Home >> Headers >> <jss/experimental_atomic.hpp> Header >> std::experimental::weak_ptr >> std::experimental::weak_ptr copy assignment operator

Replaces the value in a std::experimental::weak_ptr with a copy of the value in another std::experimental::weak_ptr.

weak_ptr& operator=(weak_ptr const& other) noexcept;

Effects:
weak_ptr& operator=(weak_ptr const& other) noexcept{
    weak_ptr temp(other);
    this->swap(temp);
    return *this;
}
Header

#include <experimental/atomic>

See Also