std::enable_shared_from_this::weak_from_this
std::enable_shared_from_this::weak_from_this
std::weak_ptr<T> weak_from_this(); | (1) | (since C++17) |
std::weak_ptr<T const> weak_from_this() const; | (2) | (since C++17) |
Returns a std::weak_ptr<T>
that tracks ownership of *this
by all existing std::shared_ptr
that refer to *this
.