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;
獲取*this的shared_ptr
構造並返回一個指向*thisshared_ptr物件,並與現有的shared_ptr物件共享所有權。

引數



返回值

指向*this.
Tshared_ptr物件是指標所指向的型別。

另見