szaszm commented on code in PR #1330: URL: https://github.com/apache/nifi-minifi-cpp/pull/1330#discussion_r878375796
########## extensions/procfs/CpuStat.h: ########## @@ -34,7 +34,12 @@ class CpuStatData { public: static std::optional<CpuStatData> parseCpuStatLine(std::istream& iss); - auto operator<=>(const CpuStatData& rhs) const = default; + bool operator<=(const CpuStatData& rhs) const; + bool operator>(const CpuStatData& rhs) const; + bool operator>=(const CpuStatData& rhs) const; + bool operator<(const CpuStatData& rhs) const; + bool operator==(const CpuStatData& rhs) const; + bool operator!=(const CpuStatData& rhs) const; Review Comment: I suggest using memberwise lexicographical comparison in the simplest possible way. AND'ing together the comparison of all members is not consistent: there can be values that are both less and greater than each other, depending on the expression used. example comparator: https://godbolt.org/z/f4nvcET1z -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org