Move-constructs a new std::experimental::shared_ptr
object from a std::experimental::shared_ptr
instance with a different pointer type.
template<class Target> explicit shared_ptr(shared_ptr<Target>&& p) noexcept;
Target*
is implicitly convertible to T*
.
Transfers ownership of the pointer from p
to the newly constructed std::experimental::shared_ptr
instance.
this->use_count()
has the value p.use_count()
had before the constructor was
invoked, and this->get()
has the value static_cast<T*>(p.get())
had before the constructor was
invoked. p.get()==0
, p.use_count()==0
.
Nothing.
#include <experimental/atomic>