std::enable_shared_from_this<T>::weak_from_this - cppreference.com
From cppreference.com
|
|
(1) | (since C++17) |
|
|
(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.
Return value
Notes
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_lib_enable_shared_from_this |
201603L |
(C++17) | std::enable_shared_from_this::weak_from_this
|
Example
See also
| smart pointer with shared object ownership semantics (class template) [edit] |