|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Protected member functions | ||||
| Public member functions | ||||
enable_shared_from_this::weak_from_this (C++17) |
std::weak_ptr<T> weak_from_this()noexcept; | (1) | (since C++17) |
std::weak_ptr<Tconst> weak_from_this()constnoexcept; | (2) | (since C++17) |
Returns astd::weak_ptr<T> that tracks ownership of*this by all existingstd::shared_ptr that refer to*this.
Contents |
| Feature-test macro | Value | Std | Feature |
|---|---|---|---|
__cpp_lib_enable_shared_from_this | 201603L | (C++17) | std::enable_shared_from_this::weak_from_this |
| This section is incomplete Reason: no example |
(C++11) | smart pointer with shared object ownership semantics (class template)[edit] |