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

Constructs a new std::experimental::weak_ptr object that shares ownership with an existing object and has the same pointer value.

weak_ptr(weak_ptr const& other) noexcept

Effects:

Constructs a new std::experimental::weak_ptr object with the same pointer value as other which shares ownership with other. other->use_count(), remains unchanged..

Postconditions:

p.use_count()==other.use_count() and !p.owner_before(other) and !other.owner_before(p)

Throws:

Nothing.

Header

#include <experimental/atomic>

See Also