hash_multiset::value_comp (STL/CLR)

复制两个元素值的排序委托。

    value_compare^ value_comp();

备注

成员函数返回该排序的委托用于对控件序列。使用该比较两个元素值。

示例

// cliext_hash_multiset_value_comp.cpp 
// compile with: /clr 
#include <cliext/hash_set> 
 
typedef cliext::hash_multiset<wchar_t> Myhash_multiset; 
int main() 
    { 
    Myhash_multiset c1; 
    Myhash_multiset::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>

命名空间: cliext

请参见

参考

hash_multiset (STL/CLR)

hash_multiset::value_compare (STL/CLR)

hash_multiset::value_type (STL/CLR)