In your class, you may overload the "<" operator.
class MyClass{ bool operator <(const MyClass& rhs) { return this->key < rhs.key; }}
In your class, you may overload the "<" operator.
class MyClass{ bool operator <(const MyClass& rhs) { return this->key < rhs.key; }}