public member function
<memory>

std::enable_shared_from_this::shared_from_this

shared_ptr <T>       shared_from_this();shared_ptr <const T> shared_from_this() const;
Get shared_ptr from *this
Constructs and returns a shared_ptr object pointing to *this and sharing ownership with existing shared_ptr objects.

Parameters

none

Return value

A shared_ptr object pointing to *this.
T is the type pointed by the shared_ptr.

See also