hash_multimap::hasher (STL/CLR)

密钥的哈希委托。

    Microsoft::VisualC::StlClr::UnaryDelegate<GKey, int>
        hasher;

备注

描述类型转换键值转换为整数的委托。

示例

// cliext_hash_multimap_hasher.cpp 
// compile with: /clr 
#include <cliext/hash_map> 
 
typedef cliext::hash_multimap<wchar_t, int> Myhash_multimap; 
int main() 
    { 
    Myhash_multimap c1; 
    Myhash_multimap::hasher^ myhash = c1.hash_delegate(); 
 
    System::Console::WriteLine("hash(L'a') = {0}", myhash(L'a')); 
    System::Console::WriteLine("hash(L'b') = {0}", myhash(L'b')); 
    return (0); 
    } 
 
  

要求

标题: <cliext/hash_map>

命名空间: cliext

请参见

参考

hash_multimap (STL/CLR)

hash_multimap::hash_delegate (STL/CLR)