From 00e55ad589109d1634919c15d0da1f86ecef0e3d Mon Sep 17 00:00:00 2001 From: DH Date: Tue, 17 Oct 2023 23:25:39 +0300 Subject: [PATCH] [orbis-kernel] utils: rc add raw pointer comparison operator --- orbis-kernel/include/orbis/utils/Rc.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orbis-kernel/include/orbis/utils/Rc.hpp b/orbis-kernel/include/orbis/utils/Rc.hpp index 22d4efc13..f728b849d 100644 --- a/orbis-kernel/include/orbis/utils/Rc.hpp +++ b/orbis-kernel/include/orbis/utils/Rc.hpp @@ -120,8 +120,8 @@ public: T *release() { return std::exchange(m_ref, nullptr); } T *operator->() const { return m_ref; } explicit operator bool() const { return m_ref != nullptr; } + bool operator==(const Ref &) const = default; bool operator==(std::nullptr_t) const { return m_ref == nullptr; } - bool operator!=(std::nullptr_t) const { return m_ref != nullptr; } auto operator<=>(const T *other) const { return m_ref <=> other; } auto operator<=>(const Ref &other) const = default; };