std::enable_shared_from_this<T>::weak_from_this
From cppreference.com
< cpp | memory | enable_shared_from_this
| std::weak_ptr<T> weak_from_this() noexcept; |
(1) | (C++17以降) |
| std::weak_ptr<T const> weak_from_this() const noexcept; |
(2) | (C++17以降) |
*this を参照する既存のすべての std::shared_ptr による *this の所有権を追跡する std::weak_ptr<T> を返します。
目次 |
[編集] 戻り値
[編集] 備考
| 機能テストマクロ | 値 | 規格 | 機能 |
|---|---|---|---|
__cpp_lib_enable_shared_from_this |
201603L |
(C++17) | std::enable_shared_from_this::weak_from_this
|
[編集] 例
| このセクションは未完成です 理由: 例がありません |
[編集] 関連項目
| (C++11) |
オブジェクトの所有権を共有するセマンティクスを持つスマートポインタ (クラステンプレート) |