Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at hash_map::hasher (STL/CLR).
The hashing delegate for a key.
Syntax
Microsoft::VisualC::StlClr::UnaryDelegate<GKey, int>
hasher;
Remarks
The type describes a delegate that converts a key value to an integer.
Example
// cliext_hash_map_hasher.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);
}
hash
(L'a') = 1616896120
hash
(L'b') = 570892832
Requirements
Header: <cliext/hash_map>
Namespace: cliext