Namespaces
Variants

std::hash<std::type_index>

来自 zh.cppreference.net
 
 
 
类型支持
基本类型
定宽整数类型 (C++11)
定宽浮点类型 (C++23)
(C++11)    
(C++17)
数值极限
C 数值极限接口
运行时类型信息
 
 
定义于头文件 <typeindex>
template<> struct hash<std::type_index>;
(C++11 起)

模板特化 std::hash 用于 std::type_index 使用户能够获取 std::type_index 类型对象的哈希值。

成员函数 operator() 实际上返回与 hash_code() 相同的值。

参见

返回哈希码
(公开成员函数)