Create a std::shared_ptr
object that shares ownership
with *this
.
operator std::shared_ptr<T>() const;
A std::shared_ptr<T>
that holds the value of this->get()
and shares ownership with *this
.
result.get()==this->get()
.
If this->use_count()
is non zero it is increased by 1 and result.use_count()>0
.
std::bad_alloc
if memory could not
be allocated for any internal data structures.
If *this
was constructed from a std::shared_ptr
then no memory allocation may be required. The referenced object
will remain valid until the last std::experimental::shared_ptr
and std::shared_ptr
object that references
it has been destroyed or reassigned.
#include <experimental/atomic>