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