summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AK/NonnullRefPtr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/AK/NonnullRefPtr.h b/AK/NonnullRefPtr.h
index 021b72eb0a..fa107b35a7 100644
--- a/AK/NonnullRefPtr.h
+++ b/AK/NonnullRefPtr.h
@@ -218,6 +218,12 @@ public:
AK::swap(m_ptr, other.m_ptr);
}
+ bool operator==(NonnullRefPtr const& other) const { return m_ptr == other.m_ptr; }
+ bool operator!=(NonnullRefPtr const& other) const { return m_ptr != other.m_ptr; }
+
+ bool operator==(NonnullRefPtr& other) { return m_ptr == other.m_ptr; }
+ bool operator!=(NonnullRefPtr& other) { return m_ptr != other.m_ptr; }
+
// clang-format off
private:
NonnullRefPtr() = delete;