Created
December 7, 2021 03:56
-
-
Save CodesOfRishi/f99fdd69166aa74ff5c43fca7a297796 to your computer and use it in GitHub Desktop.
Overloading Relational Operator for a STL Class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// overloading relational operator for a STL class | |
bool operator<(const Name &rhs) const { return value < rhs.value; } | |
bool operator==(const Name &rhs) const { return value == rhs.value; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment