[orbis-kernel] utils: rc add raw pointer comparison operator

This commit is contained in:
DH 2023-10-17 23:25:39 +03:00
parent 288f7fcc7a
commit 00e55ad589

View file

@ -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;
};