|
MSTL 1.4.0
A Modern C++ Library with extended functionality, web components, and utility libraries
|
可哈希对象接口模板 更多...
#include <icommon.hpp>
Public 成员函数 | |
| MSTL_NODISCARD constexpr size_t | to_hash () const noexcept(noexcept(derived().to_hash())) |
| 获取对象的哈希值 | |
可哈希对象接口模板
| T | 派生类类型 |
派生类需要实现to_hash()方法,即可通过此接口自动获得哈希支持。 该接口会自动特化hash模板,使对象可用于哈希相关操作如哈希容器。
在文件 icommon.hpp 第 30 行定义.