名前空間
変種
操作

std::experimental::weak_ptr

From cppreference.com
 
 
 
 
 
ヘッダ <experimental/memory> で定義
template< class T > class weak_ptr;
(Library Fundamentals TS)

std::experimental::weak_ptr は、std::weak_ptr の変更されたバージョンであり、std::experimental::shared_ptr と相互運用可能で、配列をサポートしています。

目次

[編集] メンバ型

メンバ型 定義
element_type std::remove_extent_t<T>

[編集] メンバ関数

新しいweak_ptrを構築します。
(public member function) [編集]

std::weak_ptr と同一のメンバおよび非メンバ

メンバ関数

以下のメンバ関数は、std::shared_ptr の代わりに std::experimental::shared_ptr を、std::weak_ptr の代わりに std::experimental::weak_ptr を扱います。それ以外は同様の動作をします。

weak_ptr を破棄する
(public member function of std::weak_ptr<T>) [編集]
weak_ptr を代入する
(public member function of std::weak_ptr<T>) [編集]
変更
管理されているオブジェクトの所有権を解放します。
(public member function of std::weak_ptr<T>) [編集]
管理対象オブジェクトを交換する
(public member function of std::weak_ptr<T>) [編集]
監視
オブジェクトを管理する shared_ptr オブジェクトの数を返す
(public member function of std::weak_ptr<T>) [編集]
参照されたオブジェクトが既に削除されたかどうかを確認する
(public member function of std::weak_ptr<T>) [編集]
参照されたオブジェクトを管理する shared_ptr を作成する
(public member function of std::weak_ptr<T>) [編集]
weak pointer の所有者ベースの順序付けを提供します
(std::weak_ptr<T> のパブリックメンバ関数) [編集]

非メンバ関数

この非メンバ関数はstd::experimental名前空間で宣言されており、std::weak_ptrではなくstd::experimental::weak_ptrを扱いますが、それ以外は対応するC++14関数と同一の動作をします。

std::swap アルゴリズムを特殊化する
(関数テンプレート) [編集]

[編集]

English 日本語 中文(简体) 中文(繁體)