次の方法で共有


hash_multimap::hash_delegate (STL/CLR)

指定したキーに一致する要素を検索します。

hasher^ hash_delegate();

解説

このメンバー関数は、キー値を整数に変換するために使用するデリゲートを返します。 キーをハッシュするために使用します。

使用例

// cliext_hash_multimap_hash_delegate.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::hasher (STL/CLR)