diff --git a/include/hyprutils/memory/WeakPtr.hpp b/include/hyprutils/memory/WeakPtr.hpp index d4a1b8e..023bf78 100644 --- a/include/hyprutils/memory/WeakPtr.hpp +++ b/include/hyprutils/memory/WeakPtr.hpp @@ -153,6 +153,14 @@ namespace Hyprutils { return impl_ == rhs.impl_; } + bool operator==(std::nullptr_t) const { + return !valid(); + } + + bool operator!=(std::nullptr_t) const { + return valid(); + } + bool operator()(const CWeakPointer& lhs, const CWeakPointer& rhs) const { return reinterpret_cast(lhs.impl_) < reinterpret_cast(rhs.impl_); }