summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2024-09-24 12:31:56 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2024-09-24 12:31:56 +0200
commitad6e36bd799d01340673a3309eca1b1de07e883c (patch)
tree3145d65df040f0d9d0aead7346709f6d1470dbe6 /modules
parent9dd079f6c90405622e4b08a3337fb91f2a9935ff (diff)
Adding more comparison operators
Diffstat (limited to 'modules')
-rw-r--r--modules/codec/c++/data.hpp15
1 files changed, 15 insertions, 0 deletions
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<typename Enc>
+ constexpr bool operator>(const data<Schema,Enc>& rhs) const {
+ return get() > rhs.get();
+ }
+
+ template<typename Enc>
+ constexpr bool operator<=(const data<Schema,Enc>& rhs) const {
+ return get() <= rhs.get();
+ }
+
+ template<typename Enc>
+ constexpr bool operator>=(const data<Schema,Enc>& rhs) const {
+ return get() >= rhs.get();
+ }
+
/**
* Casts
*/