std::weak_ptr<T>:: owner_hash
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Modifiers | ||||
| Observers | ||||
|
weak_ptr::owner_hash
(C++26)
|
||||
|
(C++26)
|
||||
| Non-member functions | ||||
| Helper classes | ||||
|
(C++20)
|
||||
| Deduction guides (C++17) |
|
std::
size_t
owner_hash
(
)
const
noexcept
;
|
(C++26以降) | |
任意のオブジェクト
other
について
owner_equal
(
other
)
が
true
である場合に、
owner_hash
(
)
==
other.
owner_hash
(
)
が
true
となるような未規定の値を返す。
このハッシュ処理は、通常 std::owner_hash を通じて、共有ポインタと弱参照ポインタを非順序連想コンテナのキーとして使用可能にするために用いられます。
目次 |
戻り値
同じ所有権を共有する任意の
std::shared_ptr
または
std::weak_ptr
オブジェクトに対して同一の値。
注記
| 機能テスト マクロ | 値 | 標準 | 機能 |
|---|---|---|---|
__cpp_lib_smart_ptr_owner_equality
|
202306L
|
(C++26) |
std::weak_ptr
を
非順序連想コンテナ
のキーとして使用可能にする
|
例
|
このセクションは不完全です
理由: 例 |
関連項目
|
(C++26)
|
共有ポインタおよび弱ポインタのためのオーナーベースハッシュを提供する
(クラス) |