Construct a new std::experimental::shared_ptr object that owns
the supplied pointer.
template<class Target> explicit shared_ptr(Target* p);
Target*
is implicitly convertible to T*.
Construct a new std::experimental::shared_ptr instance that
owns p.
this->unique()
and this->get()==static_cast<T*>(p)
for the newly-constructed std::experimental::shared_ptr object.
This allows you to construct a std::experimental::shared_ptr for which
get member function is
nullptr, but use_count member function
is non-zero.
std::bad_alloc if memory for the internal
data structures of std::experimental::shared_ptr could not be
allocated.
#include <experimental/atomic>