diff --git a/src/java/Ref.hxx b/src/java/Ref.hxx index 40e415497..421b3d5f0 100644 --- a/src/java/Ref.hxx +++ b/src/java/Ref.hxx @@ -85,6 +85,14 @@ public: return value != nullptr; } + bool operator==(std::nullptr_t n) const noexcept { + return value == n; + } + + bool operator!=(std::nullptr_t n) const noexcept { + return !(*this == n); + } + T Get() const noexcept { return value; }