The unordered_multiset::key_eq() is a built-in function in C++ STL which returns a boolean value according to the comparison. It depends on the key equivalence comparison predicate used by the unordered_multiset container. The key equivalence comparison is a predicate which takes two arguments and returns a boolean value indicating whether they are to be considered equivalent. It returns true if they are equivalent else it returns false. It is adopted by the container on construction and is similar to the (==) operator used in the comparison.
Parameter: The function accepts two mandatory parameters args1 and args2, between whom the comparison is to be done. The data_type is same as that of the unordered_multiset.
Return Value: The function returns a boolean value.
Below programs illustrate the unordered_multiset::key_eq() function:
GEEKS and geeks are treated dissimilarly in the container
100 and 200 are treated dissimilarly in the container 100 and 100 are treated similarly in the container
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- div() function in C++
- log() function in C++
- exp() function C++
- fma() function in C++
- wcstombs() function in C++ STL
- iswalpha() function in C++ STL
- towupper() function in C/C++
- strtol() function in C++ STL
- fread() function in C++
- exp2() function in C++ STL
- feupdateenv() function in C++
- raise() function in C++
- strtod() function in C/C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.