Skip to content

Instantly share code, notes, and snippets.

@CodesOfRishi
Created December 7, 2021 03:56
Show Gist options
  • Save CodesOfRishi/f99fdd69166aa74ff5c43fca7a297796 to your computer and use it in GitHub Desktop.
Save CodesOfRishi/f99fdd69166aa74ff5c43fca7a297796 to your computer and use it in GitHub Desktop.
Overloading Relational Operator for a STL Class
// 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