std:: hash <std::shared_ptr>
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
| Modifiers | ||||
| Observers | ||||
|
(C++17)
|
||||
|
(
until C++20*
)
|
||||
|
(C++26)
|
||||
|
(C++26)
|
||||
| Non-member functions | ||||
|
(until C++20)
(until C++20)
(until C++20)
(until C++20)
(until C++20)
(C++20)
|
||||
|
functions
(
until C++26*
)
|
||||
| Helper classes | ||||
|
(C++20)
|
||||
|
hash
<std::shared_ptr>
|
||||
| Deduction guides (C++17) |
|
template
<
class
T
>
struct hash < std:: shared_ptr < T >> ; |
(C++11 起) | |
针对 std:: shared_ptr < T > 的 std::hash 模板特化允许用户获取 std:: shared_ptr < T > 类型对象的哈希值。
对于给定的 std:: shared_ptr < T > p ,该特化确保 std:: hash < std:: shared_ptr < T >> ( ) ( p ) == std:: hash < decltype ( p. get ( ) ) > ( ) ( p. get ( ) ) 。
示例
|
本节内容不完整
原因:缺少示例 |
参见
|
(C++11)
|
哈希函数对象
(类模板) |