From ad6e36bd799d01340673a3309eca1b1de07e883c Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 24 Sep 2024 12:31:56 +0200 Subject: Adding more comparison operators --- modules/codec/c++/data.hpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 33f301f..1c8db80 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -182,6 +182,21 @@ public: return get() < rhs.get(); } + template + constexpr bool operator>(const data& rhs) const { + return get() > rhs.get(); + } + + template + constexpr bool operator<=(const data& rhs) const { + return get() <= rhs.get(); + } + + template + constexpr bool operator>=(const data& rhs) const { + return get() >= rhs.get(); + } + /** * Casts */ -- cgit v1.2.3