@@ -2751,6 +2751,53 @@ compare([L'a', 1], [L'b', 2]) = True
27512751compare([L'b', 2], [L'a', 1]) = False
27522752```
27532753
2754+ ## <a name =" value_compare " ></a > hash_map::value_compare (STL/CLR)
2755+ The ordering delegate for two element values.
2756+
2757+ ### Syntax
2758+
2759+ ```
2760+ Microsoft::VisualC::StlClr::BinaryDelegate<generic_value, generic_value, bool>
2761+ value_compare;
2762+ ```
2763+
2764+ ### Remarks
2765+ The type is a synonym for the delegate that determines the ordering of its value arguments.
2766+
2767+ ### Example
2768+
2769+ ``` cpp
2770+ // cliext_hash_map_value_compare.cpp
2771+ // compile with: /clr
2772+ #include < cliext/hash_map>
2773+
2774+ typedef cliext::hash_map<wchar_t , int > Myhash_map;
2775+ int main ()
2776+ {
2777+ Myhash_map c1;
2778+ Myhash_map::value_compare^ kcomp = c1.value_comp();
2779+
2780+ System::Console::WriteLine ("compare([ L'a', 1] , [ L'a', 1] ) = {0}",
2781+ kcomp(Myhash_map::make_value(L'a', 1),
2782+ Myhash_map::make_value(L'a', 1)));
2783+ System::Console::WriteLine("compare([ L'a', 1] , [ L'b', 2] ) = {0}",
2784+ kcomp(Myhash_map::make_value(L'a', 1),
2785+ Myhash_map::make_value(L'b', 2)));
2786+ System::Console::WriteLine("compare([ L'b', 2] , [ L'a', 1] ) = {0}",
2787+ kcomp(Myhash_map::make_value(L'b', 2),
2788+ Myhash_map::make_value(L'a', 1)));
2789+ System::Console::WriteLine();
2790+ return (0);
2791+ }
2792+
2793+ ```
2794+
2795+ ```Output
2796+ compare([L'a', 1], [L'a', 1]) = True
2797+ compare([L'a', 1], [L'b', 2]) = True
2798+ compare([L'b', 2], [L'a', 1]) = False
2799+ ```
2800+
27542801## <a name =" value_type " ></a > hash_map::value_type (STL/CLR)
27552802The type of an element.
27562803
0 commit comments