key_seq(): This function is available in the File: unordered_set.h. This function is a build-in function in STL of C++.
Syntax:
std::equal_to<int> std::unordered_set<int>::key_eq() const
This functions returns the key comparison object with which the unordered_set was constructed.
File: unordered_set.h
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){unordered_set<string> st;bool res = st.key_eq()("hello", "hello");if (res==1)cout << "equal\n";elsecout << "not equal\n";return 0;}
Output:
equal
No comments:
Post a Comment