Share via


hash_map::hash_delegate (STL/CLR)

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

hasher^ hash_delegate();

解説

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

使用例

// cliext_hash_map_hash_delegate.cpp 
// compile with: /clr 
#include <cliext/hash_map> 
 
typedef cliext::hash_map<wchar_t, int> Myhash_map; 
int main() 
    { 
    Myhash_map c1; 
    Myhash_map::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_map (STL/CLR)

hash_map::hasher (STL/CLR)