Freigeben über


hash_multimap::value_compare (STL/CLR)

 

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_multimap::value_compare (STL/CLR).

The ordering delegate for two element values.

Syntax

Microsoft::VisualC::StlClr::BinaryDelegate<generic_value, generic_value, bool>  
    value_compare;  

Remarks

The type is a synonym for the delegate that determines the ordering of its value arguments.

Example

// 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);   
    }  
  
compare
([L'a', 1], [L'a', 1]) = True  
compare
([L'a', 1], [L'b', 2]) = True  
compare
([L'b', 2], [L'a', 1]) = False  

Requirements

Header: <cliext/hash_map>

Namespace: cliext

See Also

hash_multimap (STL/CLR)
hash_multimap::key_compare (STL/CLR)
hash_multimap::value_comp (STL/CLR)
hash_multimap::value_type (STL/CLR)