J
Jayden
I have a class with an attribute of type std::string. I'd like to provide some comparison operator functions like <, >, ==, <=, and >= for the class by comparing the attribute.
My questions is that: any easy way or tool to
(1) just write one or two functions, such as the one for operator < (and ==), others can be automatically generated.
(2) or even simpler since the class comparison is depending on its attribute of type std::string whose comparison functions are already provided.
Thank you so much!
Jayden
My questions is that: any easy way or tool to
(1) just write one or two functions, such as the one for operator < (and ==), others can be automatically generated.
(2) or even simpler since the class comparison is depending on its attribute of type std::string whose comparison functions are already provided.
Thank you so much!
Jayden