hash_multimap::value_compare (STL/CLR)
兩個項目值排序委派。
Microsoft::VisualC::StlClr::BinaryDelegate<generic_value, generic_value, bool>
value_compare;
備註
型別是同義字,以判斷其個數字引數的順序委派。
範例
// cliext_hash_multimap_value_compare.cpp
// compile with: /clr
#include <cliext/hash_map>
typedef cliext::hash_map<wchar_t, int> Myhash_multimap;
int main()
{
Myhash_multimap c1;
Myhash_multimap::value_compare^ kcomp = c1.value_comp();
System::Console::WriteLine("compare([L'a', 1], [L'a', 1]) = {0}",
kcomp(Myhash_multimap::make_value(L'a', 1),
Myhash_multimap::make_value(L'a', 1)));
System::Console::WriteLine("compare([L'a', 1], [L'b', 2]) = {0}",
kcomp(Myhash_multimap::make_value(L'a', 1),
Myhash_multimap::make_value(L'b', 2)));
System::Console::WriteLine("compare([L'b', 2], [L'a', 1]) = {0}",
kcomp(Myhash_multimap::make_value(L'b', 2),
Myhash_multimap::make_value(L'a', 1)));
System::Console::WriteLine();
return (0);
}
需求
標頭: < cliext/hash_map >
Namespace: cliext
請參閱
參考
hash_multimap::key_compare (STL/CLR)