| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 成员函数 | ||||
| 修改器 | ||||
| 观察器 | ||||
(C++17) | ||||
(C++20 前*) | ||||
(C++26) | ||||
(C++26) | ||||
| 非成员函数 | ||||
(C++20 前)(C++20 前)(C++20 前)(C++20 前)(C++20 前)(C++20) | ||||
函数 (C++26 前*) | ||||
| 辅助类 | ||||
(C++20) | ||||
| 推导指引(C++17) |
template< class T >
struct hash<std::shared_ptr<T>>;
|
(C++11 起) | |
std::hash 对 std::shared_ptr<T> 的模板特化允许用户获得 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) |
散列函数对象 (类模板) [编辑] |