From f833939fe38d00b27acef5f9251892a3ad3c1b08 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Wed, 9 Oct 2024 15:20:39 +0200 Subject: Testing deduction behaviour --- modules/codec/c++/data.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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::type>(1)); return *this; } + + template + constexpr bool equals(const data& rhs)const{ + return get() == rhs.get(); + } template constexpr bool operator==(const data& rhs)const{ - return get() == rhs.get(); + return equals(rhs); + } + + template + constexpr bool operator!=(const data& rhs) const { + return get() != rhs.get(); } template -- cgit v1.2.3