std::hash<std::shared_ptr>
来自cppreference.com
<tbody>
</tbody>
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) |
散列函数对象 (类模板) |