unordered_multimap::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_multimap 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_multimap.
Return Value: The function returns a boolean value.
Below programs illustrate the unordered_multimap::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
- How to call some function before main() function in C++?
- Function Overloading vs Function Overriding in C++
- Difference between Virtual function and Pure virtual function 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++
- unordered_map end( ) function in C++ STL
- strcspn() function in C/C++
- array get() function in C++ STL
- array at() function in C++ STL
- iswspace() function in C/C++
- Modulus function in C++ STL
- transform_inclusive_scan() function in 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.