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;