다음을 통해 공유


unordered_multimap::hash_function

저장된 해시 함수 코드 개체를 가져옵니다.

Hash hash_function() const;

설명

The member function returns the stored hash function object.

예제

 

// std_tr1__unordered_map__unordered_multimap_hash_function.cpp 
// compile with: /EHsc 
#include <unordered_map> 
#include <iostream> 
 
typedef std::unordered_multimap<char, int> Mymap; 
int main() 
    { 
    Mymap c1; 
 
    Mymap::hasher hfn = c1.hash_function(); 
    std::cout << "hfn('a') == " << hfn('a') << std::endl; 
    std::cout << "hfn('b') == " << hfn('b') << std::endl; 
 
    return (0); 
    } 
 
  

요구 사항

헤더:<unordered_map>

네임스페이스: std

참고 항목

참조

<unordered_map>

unordered_multimap 클래스