diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-10-09 15:20:39 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-10-09 15:20:39 +0200 |
commit | f833939fe38d00b27acef5f9251892a3ad3c1b08 (patch) | |
tree | c415ac0870405ca1d0fe2e25e462e2c9b3507cc0 /modules | |
parent | c00c5982aa94725363acaada866fc8d0a115f457 (diff) |
Testing deduction behaviour
Diffstat (limited to 'modules')
-rw-r--r-- | modules/codec/c++/data.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 1c8db80..9934b44 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -171,10 +171,20 @@ public: set(get() + static_cast<typename native_data_type<Schema>::type>(1)); return *this; } + + template<typename Enc> + constexpr bool equals(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(); + return equals(rhs); + } + + template<typename Enc> + constexpr bool operator!=(const data<Schema,Enc>& rhs) const { + return get() != rhs.get(); } template<typename Enc> |