unordered_multiset::hasher

哈希函数的类型。

typedef Hash hasher;

备注

类型是的同义词。Hash模板参数

示例

 

// std_tr1__unordered_set__unordered_multiset_hasher.cpp 
// compile with: /EHsc 
#include <unordered_set> 
#include <iostream> 
 
typedef std::unordered_multiset<char> Myset; 
int main() 
    { 
    Myset c1; 
 
    Myset::hasher hfn = c1.hash_function(); 
    std::cout << "hfn('a') == " << hfn('a') << std::endl; 
    std::cout << "hfn('b') == " << hfn('b') << std::endl; 
 
    return (0); 
    } 
 
  

要求

标头: <unordered_set>

命名空间: std

请参见

参考

<unordered_set>

unordered_multiset 类

其他资源

unordered_set 成员