The != is a relational operator in C++ STL which compares the equality and inequality between unordered_set containers. The Comparison is done in the following procedure:
- First, the sizes are compared.
- Then, each element in one of the containers is looked for in the other.
unordered_set1 != unordered_set2
Parameters: This method takes the two unordered_set containers unordered_set1 and unordered_set2 as the parameters which are to be checked for equality.
Return Value: This method returns
- true: if both the unordered_set containers on the left and right of the operator are equal.
- false: if the unordered_set containers on the left and right of the operator are not equal.
Below examples illustrate the != operator:
a and b are equal a and c are not equal
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- vector::operator= and vector::operator[ ] in C++ STL
- deque::operator= and deque::operator in C++ STL
- Ternary operator vs Null coalescing operator in PHP
- Why overriding both the global new operator and the class-specific operator is not ambiguous?
- Operator Overloading '<<' and '>>' operator in a linked list class
- array::operator[ ] in C++ STL
- list::operator= in C++ STL
- forward_list::operator= in C++ STL
- map::operator in C++ STL
- multiset::operator= in C++ STL
- multimap::operator= in C++ STL
- unordered_map operator= in C++ STL
- unordered_multiset operator = in C++ STL
- bitset operator in C++ STL
- multimap operator = in C++ STL
- map operator= in C++ STL
- match_results operator in C++ STL
- unordered_set operator= in C++ STL
- set operator= in C++ STL
- unordered_set == operator in C++ STL
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.