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) |
返回std::weak_ptr<T>的所有权*this所有现存的std::shared_ptr指的是*this...
注记
这是私有可变文件的副本。weak_ptr成员,是enabled_shared_from_this...
返回值
std::weak_ptr<T>拥有*this先存std::shared_ptrS.
例外
2%29
noexcept规格:
noexcept
例
另见
shared_ptr (C++11) | smart pointer with shared object ownership semantics (class template) |
|---|
© cppreference.com在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。
本文档系腾讯云开发者社区成员共同维护,如有问题请联系 cloudcommunity@tencent.com

