hash_set::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_set::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_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);
}
compare
(L'a', L'a') = True
compare
(L'a', L'b') = True
compare
(L'b', L'a') = False
Requirements
Header: <cliext/hash_set>
Namespace: cliext
See Also
hash_set (STL/CLR)
hash_set::key_compare (STL/CLR)
hash_set::value_comp (STL/CLR)
hash_set::value_type (STL/CLR)