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