Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The ordering delegate for two element values.
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_multimap_value_compare.cpp
// compile with: /clr
#include <cliext/map>
typedef cliext::map<wchar_t, int> Mymultimap;
int main()
{
Mymultimap c1;
Mymultimap::value_compare^ kcomp = c1.value_comp();
System::Console::WriteLine("compare([L'a', 1], [L'a', 1]) = {0}",
kcomp(Mymultimap::make_value(L'a', 1),
Mymultimap::make_value(L'a', 1)));
System::Console::WriteLine("compare([L'a', 1], [L'b', 2]) = {0}",
kcomp(Mymultimap::make_value(L'a', 1),
Mymultimap::make_value(L'b', 2)));
System::Console::WriteLine("compare([L'b', 2], [L'a', 1]) = {0}",
kcomp(Mymultimap::make_value(L'b', 2),
Mymultimap::make_value(L'a', 1)));
System::Console::WriteLine();
return (0);
}
compare([L'a', 1], [L'a', 1]) = False compare([L'a', 1], [L'b', 2]) = True compare([L'b', 2], [L'a', 1]) = False
Requirements
Header: <cliext/map>
Namespace: cliext
See Also
Reference
multimap::key_compare (STL/CLR)